diff --git a/libafl/src/schedulers/ecofuzz.rs b/libafl/src/schedulers/ecofuzz.rs index 9750fceafc..de897bca1a 100644 --- a/libafl/src/schedulers/ecofuzz.rs +++ b/libafl/src/schedulers/ecofuzz.rs @@ -216,7 +216,7 @@ where S: HasCorpus + HasMetadata + HasRand + HasExecutions + HasTestcase, O: MapObserver, { - /// Add an entry to the corpus and return its index + /// Called when a [`Testcase`] is added to the corpus #[allow(clippy::cast_precision_loss)] fn on_add(&mut self, state: &mut S, idx: CorpusId) -> Result<(), Error> { let current_idx = *state.corpus().current(); diff --git a/libafl/src/schedulers/minimizer.rs b/libafl/src/schedulers/minimizer.rs index 749bf5a128..d055a55c1c 100644 --- a/libafl/src/schedulers/minimizer.rs +++ b/libafl/src/schedulers/minimizer.rs @@ -189,7 +189,7 @@ where M: AsSlice + SerdeAny + HasRefCnt, CS::State: HasCorpus + HasMetadata + HasRand, { - /// Add an entry to the corpus and return its index + /// Called when a [`Testcase`] is added to the corpus fn on_add(&mut self, state: &mut CS::State, idx: CorpusId) -> Result<(), Error> { self.base.on_add(state, idx)?; self.update_score(state, idx) diff --git a/libafl/src/schedulers/mod.rs b/libafl/src/schedulers/mod.rs index d62263de61..bc613194f4 100644 --- a/libafl/src/schedulers/mod.rs +++ b/libafl/src/schedulers/mod.rs @@ -74,7 +74,7 @@ pub trait Scheduler: UsesState where Self::State: HasCorpus, { - /// Added an entry to the corpus at the given index + /// Called when a [`Testcase`] is added to the corpus fn on_add(&mut self, _state: &mut Self::State, _idx: CorpusId) -> Result<(), Error>; // Add parent_id here if it has no inner diff --git a/libafl/src/schedulers/powersched.rs b/libafl/src/schedulers/powersched.rs index 57e6bd90e4..c57b30a911 100644 --- a/libafl/src/schedulers/powersched.rs +++ b/libafl/src/schedulers/powersched.rs @@ -252,7 +252,7 @@ where S: HasCorpus + HasMetadata + HasTestcase, O: MapObserver, { - /// Add an entry to the corpus + /// Called when a [`Testcase`] is added to the corpus fn on_add(&mut self, state: &mut Self::State, idx: CorpusId) -> Result<(), Error> { let current_idx = *state.corpus().current(); diff --git a/libafl/src/schedulers/weighted.rs b/libafl/src/schedulers/weighted.rs index 52e5c2e3f4..98d2246eeb 100644 --- a/libafl/src/schedulers/weighted.rs +++ b/libafl/src/schedulers/weighted.rs @@ -302,7 +302,7 @@ where O: MapObserver, S: HasCorpus + HasMetadata + HasRand + HasTestcase, { - /// Add an entry to the corpus and return its index + /// Called when a [`Testcase`] is added to the corpus fn on_add(&mut self, state: &mut S, idx: CorpusId) -> Result<(), Error> { let current_idx = *state.corpus().current();