Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use collections::*;
- fn main() {
- let mut db = HashMap::new();
- db.insert("hash1", vec![1, 2, 3]);
- let mut state: HashSet<_, Vec<usize>> = HashMap::new();
- for hash in xxx {
- if let Some(entry) = db.get(hash) {
- state.entry(hash).or_default().extend_from_slice(&entry);
- }
- let a = BTreeMap::new()
- for hash in a.index("ha1".."ha5")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement