Updated Scheduler::on_add documentation (#1410)
This commit is contained in:
parent
4bee9a9039
commit
8ca2df8819
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user