more no_std compatibility
This commit is contained in:
parent
41d3711ac7
commit
db3215f6be
@ -169,7 +169,7 @@ where
|
||||
pub fn load_input(&mut self) -> Result<&I, AflError> {
|
||||
if self.input.is_none() {
|
||||
let input = I::from_file(self.filename.as_ref().ok_or(AflError::EmptyOptional(
|
||||
"filename not specified".to_string(),
|
||||
"filename not specified".into(),
|
||||
))?)?;
|
||||
self.input = Some(input);
|
||||
}
|
||||
|
@ -199,6 +199,7 @@ where
|
||||
|
||||
fn fuzz_one(&mut self, state: &mut S) -> Result<usize, AflError> {
|
||||
let (testcase, idx) = state.corpus_mut().next()?;
|
||||
#[cfg(feature = "std")]
|
||||
println!("Cur entry: {}\tExecutions: {}", idx, state.executions());
|
||||
for stage in self.stages_mut() {
|
||||
stage.perform(testcase.clone(), state)?;
|
||||
|
@ -79,8 +79,9 @@ impl EventManager for LoggerEventManager {
|
||||
}
|
||||
}
|
||||
|
||||
fn fire<E: Event>(&mut self, event: E) -> Result<(), AflError> {
|
||||
println!("{}", event);
|
||||
fn fire<E: Event>(&mut self, _event: E) -> Result<(), AflError> {
|
||||
#[cfg(feature = "std")]
|
||||
println!("{}", _event);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
use alloc::rc::Rc;
|
||||
use alloc::vec::Vec;
|
||||
use core::cell::RefCell;
|
||||
use core::cmp::min;
|
||||
|
||||
use crate::inputs::bytes::BytesInput;
|
||||
use crate::inputs::Input;
|
||||
use crate::utils::{HasRand, Rand};
|
||||
use crate::AflError;
|
||||
use alloc::rc::Rc;
|
||||
use core::cell::RefCell;
|
||||
use core::cmp::min;
|
||||
|
||||
pub trait Generator<I>: HasRand
|
||||
where
|
||||
|
Loading…
x
Reference in New Issue
Block a user