Updated Scheduler::on_add documentation (#1410)

This commit is contained in:
Dominik Maier 2023-08-10 14:27:21 +02:00 committed by GitHub
parent 4bee9a9039
commit 8ca2df8819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -216,7 +216,7 @@ where
S: HasCorpus + HasMetadata + HasRand + HasExecutions + HasTestcase, S: HasCorpus + HasMetadata + HasRand + HasExecutions + HasTestcase,
O: MapObserver, 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)] #[allow(clippy::cast_precision_loss)]
fn on_add(&mut self, state: &mut S, idx: CorpusId) -> Result<(), Error> { fn on_add(&mut self, state: &mut S, idx: CorpusId) -> Result<(), Error> {
let current_idx = *state.corpus().current(); let current_idx = *state.corpus().current();

View File

@ -189,7 +189,7 @@ where
M: AsSlice<Entry = usize> + SerdeAny + HasRefCnt, M: AsSlice<Entry = usize> + SerdeAny + HasRefCnt,
CS::State: HasCorpus + HasMetadata + HasRand, 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> { fn on_add(&mut self, state: &mut CS::State, idx: CorpusId) -> Result<(), Error> {
self.base.on_add(state, idx)?; self.base.on_add(state, idx)?;
self.update_score(state, idx) self.update_score(state, idx)

View File

@ -74,7 +74,7 @@ pub trait Scheduler: UsesState
where where
Self::State: HasCorpus, 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>; fn on_add(&mut self, _state: &mut Self::State, _idx: CorpusId) -> Result<(), Error>;
// Add parent_id here if it has no inner // Add parent_id here if it has no inner

View File

@ -252,7 +252,7 @@ where
S: HasCorpus + HasMetadata + HasTestcase, S: HasCorpus + HasMetadata + HasTestcase,
O: MapObserver, 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> { fn on_add(&mut self, state: &mut Self::State, idx: CorpusId) -> Result<(), Error> {
let current_idx = *state.corpus().current(); let current_idx = *state.corpus().current();

View File

@ -302,7 +302,7 @@ where
O: MapObserver, O: MapObserver,
S: HasCorpus + HasMetadata + HasRand + HasTestcase, 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> { fn on_add(&mut self, state: &mut S, idx: CorpusId) -> Result<(), Error> {
let current_idx = *state.corpus().current(); let current_idx = *state.corpus().current();