Reformat imports and fix clippy warnings
This commit is contained in:
committed by
Timo Kösters
parent
db8a0c5d69
commit
0d69ebdc6c
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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user