Another clippy bugfix (#2806)

This commit is contained in:
Dominik Maier 2025-01-03 16:05:02 +01:00 committed by GitHub
parent da55e70aa3
commit b3b216386e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,7 +350,7 @@ where
return result.replace(Ok(MutationResult::Skipped)); return result.replace(Ok(MutationResult::Skipped));
} }
if new_len > len_max { if new_len > len_max {
return Err(Error::illegal_state("LLVMFuzzerCustomMutator returned more bytes than allowed. Expected up to {max_len} but got {new_len}")); return Err(Error::illegal_state(format!("LLVMFuzzerCustomMutator returned more bytes than allowed. Expected up to {max_len} but got {new_len}")));
} }
input.resize(new_len, 0); input.resize(new_len, 0);
Ok(MutationResult::Mutated) Ok(MutationResult::Mutated)
@ -448,7 +448,7 @@ where
} }
if new_len > len_max { if new_len > len_max {
return Err(Error::illegal_state("LLVMFuzzerCustomCrossOver returned more bytes than allowed. Expected up to {max_len} but got {new_len}")); return Err(Error::illegal_state(format!("LLVMFuzzerCustomCrossOver returned more bytes than allowed. Expected up to {max_len} but got {new_len}")));
} }
input.resize(new_len, 0); input.resize(new_len, 0);