diff --git a/libafl/src/feedbacks/mod.rs b/libafl/src/feedbacks/mod.rs index 3cd3457835..932b689e9f 100644 --- a/libafl/src/feedbacks/mod.rs +++ b/libafl/src/feedbacks/mod.rs @@ -818,6 +818,16 @@ where } } +impl FeedbackFactory, T> for NotFeedback +where + A: Feedback + FeedbackFactory, + S: State, +{ + fn create_feedback(&self, ctx: &T) -> NotFeedback { + NotFeedback::new(self.first.create_feedback(ctx)) + } +} + impl NotFeedback where A: Feedback, @@ -1279,6 +1289,12 @@ impl From for bool { } } +impl FeedbackFactory for ConstFeedback { + fn create_feedback(&self, _ctx: &T) -> ConstFeedback { + *self + } +} + #[cfg(feature = "track_hit_feedbacks")] /// Error if [`Feedback::last_result`] is called before the `Feedback` is actually run. pub(crate) fn premature_last_result_err() -> Error {