diff --git a/libafl/src/corpus/cached.rs b/libafl/src/corpus/cached.rs index 812e1bb36c..d801f64e68 100644 --- a/libafl/src/corpus/cached.rs +++ b/libafl/src/corpus/cached.rs @@ -251,7 +251,7 @@ where /// ``CachedOnDiskCorpus`` Python bindings #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] pub mod pybind { use alloc::string::String; use std::path::PathBuf; diff --git a/libafl/src/corpus/inmemory.rs b/libafl/src/corpus/inmemory.rs index 25781fd4b6..a81a75d4ed 100644 --- a/libafl/src/corpus/inmemory.rs +++ b/libafl/src/corpus/inmemory.rs @@ -429,7 +429,7 @@ where /// `InMemoryCorpus` Python bindings #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] pub mod pybind { use pyo3::prelude::*; use serde::{Deserialize, Serialize}; diff --git a/libafl/src/corpus/inmemory_ondisk.rs b/libafl/src/corpus/inmemory_ondisk.rs index ef6036e064..75fad60d27 100644 --- a/libafl/src/corpus/inmemory_ondisk.rs +++ b/libafl/src/corpus/inmemory_ondisk.rs @@ -439,7 +439,7 @@ where } #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] /// `InMemoryOnDiskCorpus` Python bindings pub mod pybind { use alloc::string::String; diff --git a/libafl/src/corpus/ondisk.rs b/libafl/src/corpus/ondisk.rs index b7beeef1e4..e5141c977b 100644 --- a/libafl/src/corpus/ondisk.rs +++ b/libafl/src/corpus/ondisk.rs @@ -262,7 +262,7 @@ where } #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] /// `OnDiskCorpus` Python bindings pub mod pybind { use alloc::string::String; diff --git a/libafl/src/events/launcher.rs b/libafl/src/events/launcher.rs index c704815a22..94a72aa068 100644 --- a/libafl/src/events/launcher.rs +++ b/libafl/src/events/launcher.rs @@ -206,7 +206,7 @@ where self.shmem_provider.post_fork(true)?; #[cfg(feature = "std")] - std::thread::sleep(std::time::Duration::from_millis(index * 10)); + std::thread::sleep(Duration::from_millis(index * 10)); #[cfg(feature = "std")] if !debug_output { @@ -549,7 +549,7 @@ where } } - std::thread::sleep(std::time::Duration::from_millis(10)); + std::thread::sleep(Duration::from_millis(10)); // Spawn clients let mut index = 0_u64; @@ -568,7 +568,7 @@ where log::info!("{:?} PostFork", unsafe { libc::getpid() }); self.shmem_provider.post_fork(true)?; - std::thread::sleep(std::time::Duration::from_millis(index * 10)); + std::thread::sleep(Duration::from_millis(index * 10)); if !debug_output { if let Some(file) = &self.opened_stdout_file { diff --git a/libafl/src/events/simple.rs b/libafl/src/events/simple.rs index a4e9c79259..bf913afb6e 100644 --- a/libafl/src/events/simple.rs +++ b/libafl/src/events/simple.rs @@ -598,7 +598,7 @@ where /// `SimpleEventManager` Python bindings #[cfg(feature = "python")] #[allow(missing_docs)] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] pub mod pybind { use pyo3::prelude::*; diff --git a/libafl/src/events/tcp.rs b/libafl/src/events/tcp.rs index 5e824c9e07..80347ca297 100644 --- a/libafl/src/events/tcp.rs +++ b/libafl/src/events/tcp.rs @@ -55,7 +55,7 @@ use crate::{ /// Tries to create (synchronously) a [`TcpListener`] that is `nonblocking` (for later use in tokio). /// Will error if the port is already in use (or other errors occur) fn create_nonblocking_listener(addr: A) -> Result { - let listener = std::net::TcpListener::bind(addr)?; + let listener = TcpListener::bind(addr)?; listener.set_nonblocking(true)?; Ok(listener) } @@ -1065,8 +1065,7 @@ where /// Launch the restarting manager pub fn launch(&mut self) -> Result<(Option, TcpRestartingEventManager), Error> { // We start ourself as child process to actually fuzz - let (staterestorer, _new_shmem_provider, core_id) = if std::env::var(_ENV_FUZZER_SENDER) - .is_err() + let (staterestorer, _new_shmem_provider, core_id) = if env::var(_ENV_FUZZER_SENDER).is_err() { let broker_things = |mut broker: TcpEventBroker, _remote_broker_addr| { if let Some(exit_cleanly_after) = self.exit_cleanly_after { diff --git a/libafl/src/executors/differential.rs b/libafl/src/executors/differential.rs index e3695a6da2..4237d657d1 100644 --- a/libafl/src/executors/differential.rs +++ b/libafl/src/executors/differential.rs @@ -37,8 +37,8 @@ impl DiffExecutor { primary, secondary, observers: UnsafeCell::new(ProxyObserversTuple { - primary: OwnedMutPtr::Ptr(core::ptr::null_mut()), - secondary: OwnedMutPtr::Ptr(core::ptr::null_mut()), + primary: OwnedMutPtr::Ptr(ptr::null_mut()), + secondary: OwnedMutPtr::Ptr(ptr::null_mut()), differential: observers, }), } diff --git a/libafl/src/executors/inprocess.rs b/libafl/src/executors/inprocess.rs index fcee2eba17..2fc826c270 100644 --- a/libafl/src/executors/inprocess.rs +++ b/libafl/src/executors/inprocess.rs @@ -661,7 +661,7 @@ mod tests { #[cfg(feature = "python")] #[allow(missing_docs)] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] /// `InProcess` Python bindings pub mod pybind { use alloc::boxed::Box; diff --git a/libafl/src/feedbacks/mod.rs b/libafl/src/feedbacks/mod.rs index 05f39baa38..f61a35b3a1 100644 --- a/libafl/src/feedbacks/mod.rs +++ b/libafl/src/feedbacks/mod.rs @@ -1096,7 +1096,7 @@ impl From for ConstFeedback { /// `Feedback` Python bindings #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] #[allow(missing_docs)] pub mod pybind { use core::ptr; diff --git a/libafl/src/generators/mod.rs b/libafl/src/generators/mod.rs index 82cb0d6d4a..e980745818 100644 --- a/libafl/src/generators/mod.rs +++ b/libafl/src/generators/mod.rs @@ -170,7 +170,7 @@ where /// `Generator` Python bindings #[allow(missing_docs)] #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] pub mod pybind { use alloc::vec::Vec; diff --git a/libafl/src/monitors/mod.rs b/libafl/src/monitors/mod.rs index bbbd9c395c..508767588e 100644 --- a/libafl/src/monitors/mod.rs +++ b/libafl/src/monitors/mod.rs @@ -1211,9 +1211,9 @@ impl ClientPerfMonitor { } #[cfg(feature = "introspection")] -impl core::fmt::Display for ClientPerfMonitor { +impl fmt::Display for ClientPerfMonitor { #[allow(clippy::cast_precision_loss)] - fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { // Calculate the elapsed time from the monitor let elapsed: f64 = self.elapsed_cycles() as f64; @@ -1291,7 +1291,7 @@ impl Default for ClientPerfMonitor { } /// `Monitor` Python bindings #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] #[allow(missing_docs)] pub mod pybind { use alloc::{boxed::Box, vec::Vec}; diff --git a/libafl/src/monitors/tui/mod.rs b/libafl/src/monitors/tui/mod.rs index 7fe0f5b969..5373e9f275 100644 --- a/libafl/src/monitors/tui/mod.rs +++ b/libafl/src/monitors/tui/mod.rs @@ -518,7 +518,7 @@ impl TuiMonitor { .map_or("None".to_string(), ToString::to_string); let stability = client.get_user_stats("stability").map_or( UserStats::new(UserStatsValue::Ratio(0, 100), AggregatorOps::Avg), - core::clone::Clone::clone, + Clone::clone, ); if afl_stats != "None" { @@ -616,7 +616,7 @@ fn run_tui_thread( let timeout = tick_rate .checked_sub(last_tick.elapsed()) .unwrap_or_else(|| Duration::from_secs(0)); - if crossterm::event::poll(timeout)? { + if event::poll(timeout)? { if let Event::Key(key) = event::read()? { match key.code { KeyCode::Char(c) => ui.on_key(c), diff --git a/libafl/src/mutators/scheduled.rs b/libafl/src/mutators/scheduled.rs index 75e780d690..a862a2a55e 100644 --- a/libafl/src/mutators/scheduled.rs +++ b/libafl/src/mutators/scheduled.rs @@ -601,7 +601,7 @@ mod tests { /// `SchedulerMutator` Python bindings #[cfg(feature = "python")] #[allow(missing_docs)] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] pub mod pybind { use pyo3::prelude::*; diff --git a/libafl/src/observers/concolic/mod.rs b/libafl/src/observers/concolic/mod.rs index 1f2eea9396..fddc5a3dd6 100644 --- a/libafl/src/observers/concolic/mod.rs +++ b/libafl/src/observers/concolic/mod.rs @@ -28,13 +28,13 @@ pub struct Location(usize); impl Debug for Location { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { - core::fmt::Debug::fmt(&self.0, f) + Debug::fmt(&self.0, f) } } impl Display for Location { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { - core::fmt::Display::fmt(&self.0, f) + Display::fmt(&self.0, f) } } diff --git a/libafl/src/observers/concolic/serialization_format.rs b/libafl/src/observers/concolic/serialization_format.rs index e30ab5f5cd..7f32171fc5 100644 --- a/libafl/src/observers/concolic/serialization_format.rs +++ b/libafl/src/observers/concolic/serialization_format.rs @@ -93,7 +93,7 @@ impl MessageFileReader { Some(Ok((message_id, message))) } Err(e) => match *e { - bincode::ErrorKind::Io(ref io_err) => match io_err.kind() { + ErrorKind::Io(ref io_err) => match io_err.kind() { io::ErrorKind::UnexpectedEof => None, _ => Some(Err(e)), }, diff --git a/libafl/src/stages/mutational.rs b/libafl/src/stages/mutational.rs index f5c5fda210..100dff4aa1 100644 --- a/libafl/src/stages/mutational.rs +++ b/libafl/src/stages/mutational.rs @@ -378,7 +378,7 @@ where #[cfg(feature = "python")] #[allow(missing_docs)] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] /// `StdMutationalStage` Python bindings pub mod pybind { use pyo3::prelude::*; diff --git a/libafl_bolts/src/lib.rs b/libafl_bolts/src/lib.rs index f19143f7eb..c51e8cfce5 100644 --- a/libafl_bolts/src/lib.rs +++ b/libafl_bolts/src/lib.rs @@ -984,6 +984,7 @@ impl log::Log for SimpleFdLogger { /// # Safety /// The function is arguably safe, but it might have undesirable side effects since it closes `stdout` and `stderr`. #[cfg(all(unix, feature = "std"))] +#[allow(unused_qualifications)] pub unsafe fn dup_and_mute_outputs() -> Result<(RawFd, RawFd), Error> { let old_stdout = stdout().as_raw_fd(); let old_stderr = stderr().as_raw_fd(); @@ -1010,7 +1011,7 @@ pub unsafe fn set_error_print_panic_hook(new_stderr: RawFd) { let mut f = unsafe { File::from_raw_fd(new_stderr) }; writeln!(f, "{panic_info}",) .unwrap_or_else(|err| println!("Failed to log to fd {new_stderr}: {err}")); - std::mem::forget(f); + mem::forget(f); })); } diff --git a/libafl_bolts/src/llmp.rs b/libafl_bolts/src/llmp.rs index a8a8cb25e9..c83bee229e 100644 --- a/libafl_bolts/src/llmp.rs +++ b/libafl_bolts/src/llmp.rs @@ -3210,7 +3210,7 @@ where Ok(stream) => stream, Err(e) => { match e.kind() { - std::io::ErrorKind::ConnectionRefused => { + ErrorKind::ConnectionRefused => { //connection refused. loop till the broker is up loop { match TcpStream::connect((_LLMP_CONNECT_ADDR, port)) { diff --git a/libafl_bolts/src/rands.rs b/libafl_bolts/src/rands.rs index 4b3353b129..430a4af0fc 100644 --- a/libafl_bolts/src/rands.rs +++ b/libafl_bolts/src/rands.rs @@ -435,7 +435,7 @@ mod tests { } #[cfg(feature = "python")] -#[allow(clippy::unnecessary_fallible_conversions)] +#[allow(clippy::unnecessary_fallible_conversions, unused_qualifications)] #[allow(missing_docs)] /// `Rand` Python bindings pub mod pybind { diff --git a/libafl_cc/src/ar.rs b/libafl_cc/src/ar.rs index 7d70c8a9a6..eb528c1962 100644 --- a/libafl_cc/src/ar.rs +++ b/libafl_cc/src/ar.rs @@ -162,7 +162,7 @@ impl ToolWrapper for ArWrapper { .base_args .iter() .map(|r| { - let arg_as_path = std::path::PathBuf::from(r); + let arg_as_path = PathBuf::from(r); if r.ends_with('.') { r.to_string() } else { @@ -185,7 +185,7 @@ impl ToolWrapper for ArWrapper { }) .collect::>(); - let Ok(ar_path) = std::env::var("LLVM_AR_PATH") else { + let Ok(ar_path) = env::var("LLVM_AR_PATH") else { panic!("Couldn't find llvm-ar. Specify the `LLVM_AR_PATH` environment variable"); }; diff --git a/libafl_cc/src/clang.rs b/libafl_cc/src/clang.rs index 22959b69e1..45bc4eb786 100644 --- a/libafl_cc/src/clang.rs +++ b/libafl_cc/src/clang.rs @@ -152,7 +152,7 @@ impl ToolWrapper for ClangWrapper { let mut suppress_linking = 0; let mut i = 1; while i < args.len() { - let arg_as_path = std::path::Path::new(args[i].as_ref()); + let arg_as_path = Path::new(args[i].as_ref()); if arg_as_path .extension() @@ -329,7 +329,7 @@ impl ToolWrapper for ClangWrapper { .base_args .iter() .map(|r| { - let arg_as_path = std::path::PathBuf::from(r); + let arg_as_path = PathBuf::from(r); if r.ends_with('.') { r.to_string() } else { @@ -366,7 +366,7 @@ impl ToolWrapper for ClangWrapper { // No output specified, we need to rewrite the single .c file's name into a -o // argument. for arg in &base_args { - let arg_as_path = std::path::PathBuf::from(arg); + let arg_as_path = PathBuf::from(arg); if !arg.ends_with('.') && !arg.starts_with('-') { if let Some(extension) = arg_as_path.extension() { let extension = extension.to_str().unwrap(); @@ -376,7 +376,7 @@ impl ToolWrapper for ClangWrapper { args.push("-o".to_string()); args.push(if self.linking { configuration - .replace_extension(&std::path::PathBuf::from("a.out")) + .replace_extension(&PathBuf::from("a.out")) .into_os_string() .into_string() .unwrap() diff --git a/libafl_cc/src/lib.rs b/libafl_cc/src/lib.rs index 608c72ced6..d81e038721 100644 --- a/libafl_cc/src/lib.rs +++ b/libafl_cc/src/lib.rs @@ -146,12 +146,12 @@ impl Configuration { let output = output.to_str().unwrap(); let new_filename = if let Some((filename, extension)) = output.split_once('.') { - if let crate::Configuration::Default = self { + if let Configuration::Default = self { format!("{filename}.{extension}") } else { format!("{filename}.{self}.{extension}") } - } else if let crate::Configuration::Default = self { + } else if let Configuration::Default = self { output.to_string() } else { format!("{output}.{self}") diff --git a/libafl_cc/src/libtool.rs b/libafl_cc/src/libtool.rs index 3e70952b95..4117efc0af 100644 --- a/libafl_cc/src/libtool.rs +++ b/libafl_cc/src/libtool.rs @@ -170,7 +170,7 @@ impl ToolWrapper for LibtoolWrapper { .base_args .iter() .map(|r| { - let arg_as_path = std::path::PathBuf::from(r); + let arg_as_path = PathBuf::from(r); if r.ends_with('.') { r.to_string() } else { @@ -191,7 +191,7 @@ impl ToolWrapper for LibtoolWrapper { }) .collect::>(); - let libtool_path = if let Ok(libtool_dir) = std::env::var("LIBTOOL_DIR") { + let libtool_path = if let Ok(libtool_dir) = env::var("LIBTOOL_DIR") { format!("{libtool_dir}/libtool") } else { "./libtool".to_string() diff --git a/libafl_frida/src/asan/asan_rt.rs b/libafl_frida/src/asan/asan_rt.rs index 62ab0ea91f..0b8b23b2d5 100644 --- a/libafl_frida/src/asan/asan_rt.rs +++ b/libafl_frida/src/asan/asan_rt.rs @@ -542,7 +542,7 @@ impl AsanRuntime { #[allow(clippy::items_after_statements)] #[allow(clippy::too_many_lines)] fn hook_functions(&mut self, gum: &Gum) { - let mut interceptor = frida_gum::interceptor::Interceptor::obtain(gum); + let mut interceptor = Interceptor::obtain(gum); macro_rules! hook_func { ($lib:expr, $name:ident, ($($param:ident : $param_type:ty),*), $return_type:ty) => { diff --git a/libafl_frida/src/cmplog_rt.rs b/libafl_frida/src/cmplog_rt.rs index 60d7cac95c..aa2f7d9cd9 100644 --- a/libafl_frida/src/cmplog_rt.rs +++ b/libafl_frida/src/cmplog_rt.rs @@ -661,11 +661,11 @@ impl CmpLogRuntime { )> { let bytes = instr.bytes(); let mut decoder = - iced_x86::Decoder::with_ip(64, bytes, instr.address(), iced_x86::DecoderOptions::NONE); + iced_x86::Decoder::with_ip(64, bytes, instr.address(), DecoderOptions::NONE); if !decoder.can_decode() { return None; } - let mut instruction = iced_x86::Instruction::default(); + let mut instruction = Instruction::default(); decoder.decode_out(&mut instruction); match instruction.mnemonic() { iced_x86::Mnemonic::Cmp | iced_x86::Mnemonic::Sub => {} // continue diff --git a/libafl_libfuzzer/libafl_libfuzzer_runtime/build.rs b/libafl_libfuzzer/libafl_libfuzzer_runtime/build.rs index c2566b847f..f3926213dc 100644 --- a/libafl_libfuzzer/libafl_libfuzzer_runtime/build.rs +++ b/libafl_libfuzzer/libafl_libfuzzer_runtime/build.rs @@ -10,7 +10,7 @@ fn main() { let build = bindgen::builder() .header("src/harness_wrap.h") .generate_comments(true) - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) .generate() .expect("Couldn't generate the harness wrapper!"); diff --git a/libafl_libfuzzer/libafl_libfuzzer_runtime/src/lib.rs b/libafl_libfuzzer/libafl_libfuzzer_runtime/src/lib.rs index 1c790ee4c5..c7a07e5538 100644 --- a/libafl_libfuzzer/libafl_libfuzzer_runtime/src/lib.rs +++ b/libafl_libfuzzer/libafl_libfuzzer_runtime/src/lib.rs @@ -105,6 +105,7 @@ mod harness_wrap { #![allow(improper_ctypes)] #![allow(clippy::unreadable_literal)] #![allow(missing_docs)] + #![allow(unused_qualifications)] include!(concat!(env!("OUT_DIR"), "/harness_wrap.rs")); } diff --git a/libafl_libfuzzer/libafl_libfuzzer_runtime/src/options.rs b/libafl_libfuzzer/libafl_libfuzzer_runtime/src/options.rs index 67965947b5..8e26c73dc0 100644 --- a/libafl_libfuzzer/libafl_libfuzzer_runtime/src/options.rs +++ b/libafl_libfuzzer/libafl_libfuzzer_runtime/src/options.rs @@ -131,7 +131,7 @@ impl LibfuzzerOptions { let name = if let Some(executable) = std::env::current_exe().ok().and_then(|path| { path.file_name() .and_then(std::ffi::OsStr::to_str) - .map(std::string::ToString::to_string) + .map(ToString::to_string) }) { executable } else { @@ -397,7 +397,7 @@ impl<'a> LibfuzzerOptionsBuilder<'a> { unknown: self .unknown .into_iter() - .map(std::string::ToString::to_string) + .map(ToString::to_string) .collect(), } } diff --git a/libafl_qemu/libafl_qemu_build/src/bindings.rs b/libafl_qemu/libafl_qemu_build/src/bindings.rs index 26d6eb4871..b4aac972ad 100644 --- a/libafl_qemu/libafl_qemu_build/src/bindings.rs +++ b/libafl_qemu/libafl_qemu_build/src/bindings.rs @@ -135,7 +135,7 @@ pub fn generate( .allowlist_function("device_list_all") .allowlist_function("libafl_.*") .blocklist_function("main_loop_wait") // bindgen issue #1313 - .parse_callbacks(Box::new(bindgen::CargoCallbacks)); + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())); // arch specific functions let bindings = if cpu_target == "i386" || cpu_target == "x86_64" { diff --git a/libafl_targets/build.rs b/libafl_targets/build.rs index aa7c3768b2..e9ef9256c0 100644 --- a/libafl_targets/build.rs +++ b/libafl_targets/build.rs @@ -214,7 +214,7 @@ fn main() { .header("src/sanitizer_interfaces.h") .use_core() .generate_comments(true) - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) .generate() .expect("Couldn't generate the sanitizer headers!"); diff --git a/libafl_targets/src/cmps/mod.rs b/libafl_targets/src/cmps/mod.rs index 3715396b96..bb33a83577 100644 --- a/libafl_targets/src/cmps/mod.rs +++ b/libafl_targets/src/cmps/mod.rs @@ -29,13 +29,12 @@ pub const CMPLOG_MAP_SIZE: usize = CMPLOG_MAP_W * CMPLOG_MAP_H; pub const CMPLOG_RTN_LEN: usize = 32; /// The hight of a cmplog routine map -pub const CMPLOG_MAP_RTN_H: usize = (CMPLOG_MAP_H * core::mem::size_of::()) - / core::mem::size_of::(); +pub const CMPLOG_MAP_RTN_H: usize = + (CMPLOG_MAP_H * mem::size_of::()) / mem::size_of::(); /// The height of extended rountine map -pub const CMPLOG_MAP_RTN_EXTENDED_H: usize = CMPLOG_MAP_H - * core::mem::size_of::() - / core::mem::size_of::(); +pub const CMPLOG_MAP_RTN_EXTENDED_H: usize = + CMPLOG_MAP_H * mem::size_of::() / mem::size_of::(); /// `CmpLog` instruction kind pub const CMPLOG_KIND_INS: u8 = 0; @@ -277,7 +276,7 @@ pub union AFLppCmpLogVals { } impl Debug for AFLppCmpLogVals { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("AFLppCmpLogVals").finish_non_exhaustive() } } @@ -324,7 +323,7 @@ pub struct CmpLogMap { impl Default for CmpLogMap { fn default() -> Self { - unsafe { core::mem::zeroed() } + unsafe { mem::zeroed() } } } @@ -493,7 +492,7 @@ impl<'de> Deserialize<'de> for AFLppCmpLogMap { D: Deserializer<'de>, { let bytes = Vec::::deserialize(deserializer)?; - let map: Self = unsafe { core::ptr::read(bytes.as_ptr() as *const _) }; + let map: Self = unsafe { ptr::read(bytes.as_ptr() as *const _) }; Ok(map) } } diff --git a/libafl_targets/src/lib.rs b/libafl_targets/src/lib.rs index 5df6d2cbfc..ce02426a2d 100644 --- a/libafl_targets/src/lib.rs +++ b/libafl_targets/src/lib.rs @@ -98,6 +98,7 @@ pub mod sanitizer_ifaces { #![allow(clippy::unreadable_literal)] #![allow(missing_docs)] #![allow(missing_debug_implementations)] + #![allow(unused_qualifications)] include!(concat!(env!("OUT_DIR"), "/sanitizer_interfaces.rs")); }