diff --git a/libafl/src/mutators/havoc_mutations.rs b/libafl/src/mutators/havoc_mutations.rs index 2da7d1a5d3..1ddf945c42 100644 --- a/libafl/src/mutators/havoc_mutations.rs +++ b/libafl/src/mutators/havoc_mutations.rs @@ -285,11 +285,10 @@ mod tests { &self.vec } } - impl DefaultMutators, &'static [u8]>> - for CustomInput - { - fn default_mutators( - ) -> MappedHavocMutationsType, &'static [u8]> { + impl DefaultMutators for CustomInput { + type Type = MappedHavocMutationsType, &'static [u8]>; + + fn default_mutators() -> Self::Type { mapped_havoc_mutations(Self::vec_mut, Self::vec) } } diff --git a/libafl/src/mutators/mod.rs b/libafl/src/mutators/mod.rs index ff609fc374..5219ae4e23 100644 --- a/libafl/src/mutators/mod.rs +++ b/libafl/src/mutators/mod.rs @@ -399,8 +399,10 @@ impl Named for NopMutator { } /// Extensions of [`crate::inputs::Input`]s that have default mutators -pub trait DefaultMutators { +pub trait DefaultMutators { + /// The resulting mutator list type + type Type; /// Get the default mutators for this type #[must_use] - fn default_mutators() -> MT; + fn default_mutators() -> Self::Type; }