diff --git a/fuzzers/binary_only/frida_libpng/src/fuzzer.rs b/fuzzers/binary_only/frida_libpng/src/fuzzer.rs index c3b1f578d92..d70e769ac4a 100644 --- a/fuzzers/binary_only/frida_libpng/src/fuzzer.rs +++ b/fuzzers/binary_only/frida_libpng/src/fuzzer.rs @@ -43,8 +43,7 @@ use libafl_frida::{ cmplog_rt::CmpLogRuntime, coverage_rt::{CoverageRuntime, MAP_SIZE}, executor::FridaInProcessExecutor, - helper::FridaInstrumentationHelper, - helper::FridaRuntimeVec, + helper::{FridaInstrumentationHelper, FridaRuntimeVec}, }; use libafl_targets::cmplog::CmpLogObserver; use mimalloc::MiMalloc; diff --git a/libafl_frida/src/helper.rs b/libafl_frida/src/helper.rs index e30ad3ea570..f09a33f51af 100644 --- a/libafl_frida/src/helper.rs +++ b/libafl_frida/src/helper.rs @@ -127,7 +127,7 @@ pub struct FridaRuntimeVec(pub Vec>); impl MatchFirstType for FridaRuntimeVec { fn match_first_type(&self) -> Option<&T> { - for member in (&self.0).iter() { + for member in &self.0 { if TypeId::of::() == member.type_id() { let raw = std::ptr::from_ref::(&**member) as *const T; return unsafe { raw.as_ref() }; @@ -138,7 +138,7 @@ impl MatchFirstType for FridaRuntimeVec { } fn match_first_type_mut(&mut self) -> Option<&mut T> { - for member in (&mut self.0).iter_mut() { + for member in &mut self.0 { if TypeId::of::() == member.type_id() { let raw = std::ptr::from_mut::(&mut **member) as *mut T; return unsafe { raw.as_mut() }; @@ -156,26 +156,26 @@ impl FridaRuntimeTuple for FridaRuntimeVec { ranges: &RangeMap, module_map: &Rc, ) { - for runtime in (&mut self.0).iter_mut() { + for runtime in &mut self.0 { runtime.init(gum, ranges, module_map); } } fn deinit_all(&mut self, gum: &Gum) { - for runtime in (&mut self.0).iter_mut() { + for runtime in &mut self.0 { runtime.deinit(gum); } } fn pre_exec_all(&mut self, input_bytes: &[u8]) -> Result<(), Error> { - for runtime in (&mut self.0).iter_mut() { + for runtime in &mut self.0 { runtime.pre_exec(input_bytes)?; } Ok(()) } fn post_exec_all(&mut self, input_bytes: &[u8]) -> Result<(), Error> { - for runtime in (&mut self.0).iter_mut() { + for runtime in &mut self.0 { runtime.post_exec(input_bytes)?; } Ok(())