diff --git a/libafl/src/mutators/scheduled.rs b/libafl/src/mutators/scheduled.rs index c625551277..6b00b506be 100644 --- a/libafl/src/mutators/scheduled.rs +++ b/libafl/src/mutators/scheduled.rs @@ -520,19 +520,15 @@ mod tests { log::trace!("{:?}", input.bytes()); // The pre-seeded rand should have spliced at position 2. - assert_eq!(input.bytes(), &[b'a', b'b', b'f']); + assert_eq!(input.bytes(), b"abf"); } #[test] fn test_havoc() { let rand = StdRand::with_seed(0x1337); let mut corpus: InMemoryCorpus = InMemoryCorpus::new(); - corpus - .add(Testcase::new(vec![b'a', b'b', b'c'].into())) - .unwrap(); - corpus - .add(Testcase::new(vec![b'd', b'e', b'f'].into())) - .unwrap(); + corpus.add(Testcase::new(b"abc".to_vec().into())).unwrap(); + corpus.add(Testcase::new(b"def".to_vec().into())).unwrap(); let mut input = corpus.cloned_input_for_id(corpus.first().unwrap()).unwrap(); let input_prior = input.clone(); diff --git a/utils/libafl_benches/benches/hash_speeds.rs b/utils/libafl_benches/benches/hash_speeds.rs index e1aee1cab2..1ae50dbd8d 100644 --- a/utils/libafl_benches/benches/hash_speeds.rs +++ b/utils/libafl_benches/benches/hash_speeds.rs @@ -25,14 +25,14 @@ fn criterion_benchmark(c: &mut Criterion) { let mut hasher = black_box(ahash::RandomState::with_seeds(123, 456, 789, 123).build_hasher()); hasher.write(black_box(&bench_vec)); - hasher.finish(); + black_box(hasher.finish()); }); }); c.bench_function("fxhash", |b| { b.iter(|| { let mut hasher = black_box(rustc_hash::FxHasher::default()); hasher.write(black_box(&bench_vec)); - hasher.finish(); + black_box(hasher.finish()); }); }); }