diff --git a/libafl/src/executors/command.rs b/libafl/src/executors/command.rs index 67d0976a53..c97c431754 100644 --- a/libafl/src/executors/command.rs +++ b/libafl/src/executors/command.rs @@ -151,15 +151,15 @@ impl CommandConfigurator for StdCommandConfigurator { /// A `CommandExecutor` is a wrapper around [`std::process::Command`] to execute a target as a child process. /// Construct a `CommandExecutor` by implementing [`CommandConfigurator`] for a type of your choice and calling [`CommandConfigurator::into_executor`] on it. /// Instead, you can use [`CommandExecutor::builder()`] to construct a [`CommandExecutor`] backed by a [`StdCommandConfigurator`]. -pub struct CommandExecutor { +pub struct CommandExecutor { /// The wrapped command configurer configurer: T, /// The observers used by this executor observers: OT, - phantom: PhantomData<(EM, S, Z)>, + phantom: PhantomData, } -impl CommandExecutor<(), (), (), (), ()> { +impl CommandExecutor<(), (), ()> { /// Creates a builder for a new [`CommandExecutor`], /// backed by a [`StdCommandConfigurator`] /// This is usually the easiest way to construct a [`CommandExecutor`]. @@ -178,7 +178,7 @@ impl CommandExecutor<(), (), (), (), ()> { } } -impl Debug for CommandExecutor +impl Debug for CommandExecutor where T: Debug, OT: Debug, @@ -191,7 +191,7 @@ where } } -impl CommandExecutor +impl CommandExecutor where T: Debug, OT: Debug, @@ -202,7 +202,7 @@ where } } -impl CommandExecutor +impl CommandExecutor where OT: MatchName + Debug + ObserversTuple, S: UsesInput, @@ -293,7 +293,7 @@ where // this only works on unix because of the reliance on checking the process signal for detecting OOM #[cfg(all(feature = "std", unix))] -impl Executor for CommandExecutor +impl Executor for CommandExecutor where EM: UsesState, S: UsesInput, @@ -357,14 +357,14 @@ where } } -impl UsesState for CommandExecutor +impl UsesState for CommandExecutor where S: UsesInput, { type State = S; } -impl UsesObservers for CommandExecutor +impl UsesObservers for CommandExecutor where OT: ObserversTuple, S: UsesInput, @@ -372,7 +372,7 @@ where type Observers = OT; } -impl HasObservers for CommandExecutor +impl HasObservers for CommandExecutor where S: UsesInput, T: Debug, @@ -527,10 +527,10 @@ impl CommandExecutorBuilder { } /// Builds the `CommandExecutor` - pub fn build( + pub fn build( &self, observers: OT, - ) -> Result, Error> + ) -> Result, Error> where OT: Debug + MatchName + ObserversTuple, S: UsesInput, @@ -578,7 +578,7 @@ impl CommandExecutorBuilder { input_location: self.input_location.clone(), command, }; - Ok(configurator.into_executor::(observers)) + Ok(configurator.into_executor::(observers)) } } @@ -628,7 +628,7 @@ pub trait CommandConfigurator: Sized + Debug { I: Input + HasTargetBytes; /// Create an `Executor` from this `CommandConfigurator`. - fn into_executor(self, observers: OT) -> CommandExecutor + fn into_executor(self, observers: OT) -> CommandExecutor where OT: Debug + MatchName, {