Make StoreUpdate generic over the byte slice ownership

This permits to call it without having to create a Vec<u8> when possible.
This commit is contained in:
Julien Cretin
2021-01-20 15:56:06 +01:00
parent 8bdfeb4aec
commit 8634e2ec24
4 changed files with 26 additions and 15 deletions

View File

@@ -303,7 +303,7 @@ impl<'a> Fuzzer<'a> {
}
/// Generates a possibly invalid update.
fn update(&mut self) -> StoreUpdate {
fn update(&mut self) -> StoreUpdate<Vec<u8>> {
match self.entropy.read_range(0, 1) {
0 => {
let key = self.key();