From 500e01816d101a093d082282916c4815e6d6e44f Mon Sep 17 00:00:00 2001 From: Valentin Huber Date: Mon, 3 Feb 2025 13:33:39 +0100 Subject: [PATCH] Rename BoolMutator to BoolInvertMutator (#2929) * Rename BoolMutator to BoolInvertMutator * Fix name of BoolInvertMutator --- libafl/src/mutators/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libafl/src/mutators/mod.rs b/libafl/src/mutators/mod.rs index 5a9745f26a..114e39dc4c 100644 --- a/libafl/src/mutators/mod.rs +++ b/libafl/src/mutators/mod.rs @@ -408,21 +408,21 @@ impl Named for NopMutator { } } -/// [`Mutator`] that flips a boolean value. +/// [`Mutator`] that inverts a boolean value. /// -/// Mostly useful in combination with [`mapping::MappingMutator`]s. +/// Mostly useful in combination with [`mapping::MappingMutator`]s to mutate parts of a complex input. #[derive(Debug)] -pub struct BoolMutator; +pub struct BoolInvertMutator; -impl Mutator for BoolMutator { +impl Mutator for BoolInvertMutator { fn mutate(&mut self, _state: &mut S, input: &mut bool) -> Result { *input = !*input; Ok(MutationResult::Mutated) } } -impl Named for BoolMutator { +impl Named for BoolInvertMutator { fn name(&self) -> &Cow<'static, str> { - &Cow::Borrowed("BoolMutator") + &Cow::Borrowed("BoolInvertMutator") } }