Reformat imports and fix clippy warnings

This commit is contained in:
Devin Ragotzy 2020-11-08 14:45:52 -05:00 committed by Timo Kösters
parent db8a0c5d69
commit 0d69ebdc6c
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
7 changed files with 34 additions and 22 deletions

View file

@ -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())
}