Skip to content

Commit 500e018

Browse files
Rename BoolMutator to BoolInvertMutator (#2929)
* Rename BoolMutator to BoolInvertMutator * Fix name of BoolInvertMutator
1 parent 6243b68 commit 500e018

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libafl/src/mutators/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,21 +408,21 @@ impl Named for NopMutator {
408408
}
409409
}
410410

411-
/// [`Mutator`] that flips a boolean value.
411+
/// [`Mutator`] that inverts a boolean value.
412412
///
413-
/// Mostly useful in combination with [`mapping::MappingMutator`]s.
413+
/// Mostly useful in combination with [`mapping::MappingMutator`]s to mutate parts of a complex input.
414414
#[derive(Debug)]
415-
pub struct BoolMutator;
415+
pub struct BoolInvertMutator;
416416

417-
impl<S> Mutator<bool, S> for BoolMutator {
417+
impl<S> Mutator<bool, S> for BoolInvertMutator {
418418
fn mutate(&mut self, _state: &mut S, input: &mut bool) -> Result<MutationResult, Error> {
419419
*input = !*input;
420420
Ok(MutationResult::Mutated)
421421
}
422422
}
423423

424-
impl Named for BoolMutator {
424+
impl Named for BoolInvertMutator {
425425
fn name(&self) -> &Cow<'static, str> {
426-
&Cow::Borrowed("BoolMutator")
426+
&Cow::Borrowed("BoolInvertMutator")
427427
}
428428
}

0 commit comments

Comments
 (0)