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,
|
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();
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user