Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. use collections::*;
  2.  
  3. fn main() {
  4. let mut db = HashMap::new();
  5. db.insert("hash1", vec![1, 2, 3]);
  6.  
  7. let mut state: HashSet<_, Vec<usize>> = HashMap::new();
  8.  
  9. for hash in xxx {
  10. if let Some(entry) = db.get(hash) {
  11. state.entry(hash).or_default().extend_from_slice(&entry);
  12. }
  13.  
  14. let a = BTreeMap::new()
  15.  
  16. for hash in a.index("ha1".."ha5")
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement