More Clippy fixes (#1415)

* More Clippy fixes

* Clippy
This commit is contained in:
Dominik Maier 2023-08-13 01:17:34 +02:00 committed by GitHub
parent b9879a8bfc
commit e0d90aa67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 8 deletions

View File

@ -75,7 +75,7 @@ c2rust-bitfields = { version = "0.17", features = ["no_std"] }
ahash = { version = "0.8", default-features=false } # The hash function already used in hashbrown
intervaltree = { version = "0.2.7", default-features = false, features = ["serde"] }
backtrace = {version = "0.3", optional = true} # Used to get the stacktrace in StacktraceObserver
typed-builder = { version = "0.15.1", optional = true } # Implement the builder pattern at compiletime
typed-builder = { version = "0.15.2", optional = true } # Implement the builder pattern at compiletime
serde_json = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
nix = { version = "0.26", optional = true }

View File

@ -53,8 +53,12 @@ use crate::{
const _AFL_LAUNCHER_CLIENT: &str = "AFL_LAUNCHER_CLIENT";
/// Provides a Launcher, which can be used to launch a fuzzing run on a specified list of cores
#[cfg(feature = "std")]
#[allow(
clippy::type_complexity,
missing_debug_implementations,
clippy::ignored_unit_patterns
)]
#[derive(TypedBuilder)]
#[allow(clippy::type_complexity, missing_debug_implementations)]
pub struct Launcher<'a, CF, MT, S, SP>
where
CF: FnOnce(Option<S>, LlmpRestartingEventManager<S, SP>, CoreId) -> Result<(), Error>,

View File

@ -1094,7 +1094,7 @@ where
/// `restarter` and `runner`, that can be used on systems both with and without `fork` support. The
/// `restarter` will start a new process each time the child crashes or times out.
#[cfg(feature = "std")]
#[allow(clippy::default_trait_access)]
#[allow(clippy::default_trait_access, clippy::ignored_unit_patterns)]
#[derive(TypedBuilder, Debug)]
pub struct RestartingMgr<MT, S, SP>
where

View File

@ -6,7 +6,9 @@ pub use simple::*;
pub mod centralized;
pub use centralized::*;
#[cfg(feature = "std")]
#[allow(clippy::ignored_unit_patterns)]
pub mod launcher;
#[allow(clippy::ignored_unit_patterns)]
pub mod llmp;
#[cfg(feature = "tcp_manager")]
pub mod tcp;

View File

@ -873,7 +873,7 @@ where
/// `restarter` and `runner`, that can be used on systems both with and without `fork` support. The
/// `restarter` will start a new process each time the child crashes or times out.
#[cfg(feature = "std")]
#[allow(clippy::default_trait_access)]
#[allow(clippy::default_trait_access, clippy::ignored_unit_patterns)]
#[derive(TypedBuilder, Debug)]
pub struct RestartingMgr<MT, S, SP>
where

View File

@ -105,14 +105,14 @@ impl ConfigTarget for Command {
) -> &mut Self {
let func = move || {
match dup2(ctl_read, FORKSRV_FD) {
Ok(_) => (),
Ok(()) => (),
Err(_) => {
return Err(io::Error::last_os_error());
}
}
match dup2(st_write, FORKSRV_FD + 1) {
Ok(_) => (),
Ok(()) => (),
Err(_) => {
return Err(io::Error::last_os_error());
}
@ -132,7 +132,7 @@ impl ConfigTarget for Command {
if use_stdin {
let func = move || {
match dup2(fd, libc::STDIN_FILENO) {
Ok(_) => (),
Ok(()) => (),
Err(_) => {
return Err(io::Error::last_os_error());
}

View File

@ -32,7 +32,7 @@ libafl_bolts = { path = "../libafl_bolts", version = "0.10.1" }
libafl_targets = { path = "../libafl_targets", version = "0.10.1" }
libafl_qemu = { path = "../libafl_qemu", version = "0.10.1" }
typed-builder = "0.15.1" # Implement the builder pattern at compiletime
typed-builder = "0.15.2" # Implement the builder pattern at compiletime
pyo3 = { version = "0.18.3", optional = true }
log = "0.4.17"