Implement HasBytesConverter for NopFuzzer (#3239)
This commit is contained in:
parent
7a9cca9e1b
commit
8c0ee046cd
@ -1150,13 +1150,17 @@ where
|
||||
|
||||
/// A [`NopFuzzer`] that does nothing
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct NopFuzzer {}
|
||||
pub struct NopFuzzer {
|
||||
converter: NopBytesConverter,
|
||||
}
|
||||
|
||||
impl NopFuzzer {
|
||||
/// Creates a new [`NopFuzzer`]
|
||||
#[must_use]
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
Self {
|
||||
converter: NopBytesConverter::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1166,6 +1170,17 @@ impl Default for NopFuzzer {
|
||||
}
|
||||
}
|
||||
|
||||
impl HasBytesConverter for NopFuzzer {
|
||||
type Converter = NopBytesConverter;
|
||||
fn converter(&self) -> &Self::Converter {
|
||||
&self.converter
|
||||
}
|
||||
|
||||
fn converter_mut(&mut self) -> &mut Self::Converter {
|
||||
&mut self.converter
|
||||
}
|
||||
}
|
||||
|
||||
impl<E, EM, I, S, ST> Fuzzer<E, EM, I, S, ST> for NopFuzzer
|
||||
where
|
||||
EM: ProgressReporter<S>,
|
||||
|
@ -298,7 +298,7 @@ impl ResizableMutator<u8> for &mut Vec<u8> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
/// Basic `NopBytesConverter` with just one type that is not converting
|
||||
pub struct NopBytesConverter {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user