Reformat imports and fix clippy warnings
This commit is contained in:
parent
db8a0c5d69
commit
0d69ebdc6c
7 changed files with 34 additions and 22 deletions
16
src/utils.rs
16
src/utils.rs
|
@ -89,9 +89,23 @@ pub fn common_elements(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
false
|
||||
})
|
||||
.all(|b| b)
|
||||
}))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sled_tests() {
|
||||
let db = sled::Config::new().temporary(true).open().unwrap();
|
||||
|
||||
db.insert(1_u64.to_be_bytes(), vec![10]).unwrap();
|
||||
db.insert(2_u64.to_be_bytes(), vec![20]).unwrap();
|
||||
db.insert(3_u64.to_be_bytes(), vec![30]).unwrap();
|
||||
|
||||
let mut key = 1_u64.to_be_bytes().to_vec();
|
||||
key.push(1);
|
||||
db.insert(key, vec![40]).unwrap();
|
||||
|
||||
println!("{:?}", db.iter().collect::<Result<Vec<_>, _>>().unwrap())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue