Skip to content

Commit c4752fd

Browse files
authored
Revert faulty renaming (#3430)
* Revert faulty renaming * Revert "Revert faulty renaming" This reverts commit 3c4b5a7. * Should use TP instead of TS for Penalty
1 parent a215ce7 commit c4752fd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/libafl/src/corpus/minimizer.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ use crate::{
2929
///
3030
/// Algorithm based on WMOPT: <https://hexhive.epfl.ch/publications/files/21ISSTA2.pdf>
3131
#[derive(Debug)]
32-
pub struct MapCorpusMinimizer<C, E, I, O, S, T, TS> {
32+
pub struct MapCorpusMinimizer<C, E, I, O, S, T, TP> {
3333
observer_handle: Handle<C>,
34-
phantom: PhantomData<(E, I, O, S, T, TS)>,
34+
phantom: PhantomData<(E, I, O, S, T, TP)>,
3535
}
3636

3737
/// Standard corpus minimizer, which weights inputs by length and time.
3838
pub type StdCorpusMinimizer<C, E, I, O, S, T> =
3939
MapCorpusMinimizer<C, E, I, O, S, T, LenTimeMulTestcasePenalty>;
4040

41-
impl<C, E, I, O, S, T, TS> MapCorpusMinimizer<C, E, I, O, S, T, TS>
41+
impl<C, E, I, O, S, T, TP> MapCorpusMinimizer<C, E, I, O, S, T, TP>
4242
where
4343
C: Named,
4444
{
@@ -52,14 +52,14 @@ where
5252
}
5353
}
5454

55-
impl<C, E, I, O, S, T, TS> MapCorpusMinimizer<C, E, I, O, S, T, TS>
55+
impl<C, E, I, O, S, T, TP> MapCorpusMinimizer<C, E, I, O, S, T, TP>
5656
where
5757
for<'a> O: MapObserver<Entry = T> + AsIter<'a, Item = T>,
5858
C: AsRef<O>,
5959
I: Input,
6060
S: HasMetadata + HasCorpus<I> + HasExecutions,
6161
T: Copy + Hash + Eq,
62-
TS: TestcasePenalty<I, S>,
62+
TP: TestcasePenalty<I, S>,
6363
{
6464
/// Do the minimization
6565
#[expect(clippy::too_many_lines)]
@@ -121,7 +121,7 @@ where
121121

122122
let mut testcase = state.corpus().get(id)?.borrow_mut();
123123
(
124-
TS::compute(state, &mut *testcase)?
124+
TP::compute(state, &mut *testcase)?
125125
.to_u64()
126126
.expect("Weight must be computable."),
127127
*state.executions(),

0 commit comments

Comments
 (0)