diff --git a/fuzzers/generic_inmemory/src/lib.rs b/fuzzers/generic_inmemory/src/lib.rs index cbaf4c3d40..f2460c0783 100644 --- a/fuzzers/generic_inmemory/src/lib.rs +++ b/fuzzers/generic_inmemory/src/lib.rs @@ -53,26 +53,26 @@ pub fn libafl_main() { .expect("No valid core count given!"); let broker_port = matches .value_of("broker_port") - .map(|s| s.parse().expect("Invalid broker port".into())) + .map(|s| s.parse().expect("Invalid broker port")) .unwrap_or(1337); let remote_broker_addr = matches .value_of("remote_broker_addr") - .map(|s| s.parse().expect("Invalid broker address".into())); + .map(|s| s.parse().expect("Invalid broker address")); let input_dirs: Vec = matches .values_of("input") - .map(|v| v.map(|s| PathBuf::from(s)).collect()) - .unwrap_or(vec![]); + .map(|v| v.map(PathBuf::from).collect()) + .unwrap_or_default(); let output_dir = matches .value_of("output") - .map(|s| PathBuf::from(s)) - .unwrap_or(workdir.clone()); + .map(PathBuf::from) + .unwrap_or_else(|| workdir.clone()); let token_files: Vec<&str> = matches .values_of("tokens") .map(|v| v.collect()) - .unwrap_or(vec![]); + .unwrap_or_default(); let timeout_ms = matches .value_of("timeout") - .map(|s| s.parse().expect("Invalid timeout".into())) + .map(|s| s.parse().expect("Invalid timeout")) .unwrap_or(10000); // let cmplog_enabled = matches.is_present("cmplog"); @@ -197,7 +197,7 @@ pub fn libafl_main() { // In case the corpus is empty (on first run), reset if state.corpus().count() < 1 { - if input_dirs.len() == 0 { + if input_dirs.is_empty() { // Generator of printable bytearrays of max size 32 let mut generator = RandBytesGenerator::new(32); diff --git a/libafl/src/bolts/llmp.rs b/libafl/src/bolts/llmp.rs index ff92c47379..c3a311990a 100644 --- a/libafl/src/bolts/llmp.rs +++ b/libafl/src/bolts/llmp.rs @@ -475,7 +475,7 @@ unsafe fn _llmp_next_msg_ptr(last_msg: *const LlmpMsg) -> *mut LlmpMsg { /// May be used to restore the map by id. #[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct LlmpDescription { - /// Info about the ShredMap in use + /// Info about the [`ShMem`] in use shmem: ShMemDescription, /// The last message sent or received, depnding on page type last_message_offset: Option,