Skip to content

Commit b00894e

Browse files
authored
Small cleanup (#3788)
Signed-off-by: Aditya30ag <adityaagrwal3005@gmail.com>
1 parent 352511a commit b00894e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/libafl/src/mutators/mutations.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,10 +1540,9 @@ where
15401540
// No need to load the input again, it'll still be cached.
15411541
let other_input = &mut other_testcase.input().as_ref().unwrap();
15421542
let wrapped_mapped_other_input = (self.input_mapper)(other_input).map_to_option_bytes();
1543-
if wrapped_mapped_other_input.is_none() {
1543+
let Some(mapped_other_input) = wrapped_mapped_other_input else {
15441544
return Ok(MutationResult::Skipped);
1545-
}
1546-
let mapped_other_input = wrapped_mapped_other_input.unwrap();
1545+
};
15471546

15481547
Ok(CrossoverInsertMutator::crossover_insert(
15491548
input,
@@ -1635,10 +1634,9 @@ where
16351634
// No need to load the input again, it'll still be cached.
16361635
let other_input = &mut other_testcase.input().as_ref().unwrap();
16371636
let wrapped_mapped_other_input = (self.input_mapper)(other_input).map_to_option_bytes();
1638-
if wrapped_mapped_other_input.is_none() {
1637+
let Some(mapped_other_input) = wrapped_mapped_other_input else {
16391638
return Ok(MutationResult::Skipped);
1640-
}
1641-
let mapped_other_input = wrapped_mapped_other_input.unwrap();
1639+
};
16421640

16431641
Ok(CrossoverReplaceMutator::crossover_replace(
16441642
input,

0 commit comments

Comments
 (0)