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,
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();

View File

@ -189,7 +189,7 @@ where
M: AsSlice<Entry = usize> + 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)

View File

@ -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

View File

@ -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();

View File

@ -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();