Guest User

Untitled

a guest
Dec 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. fn main() {
  2. let test = String::from("Test");
  3.  
  4. for c in test.chars() {
  5. let mut line_occurrences: HashMap<char, u32> = HashMap::new();
  6.  
  7. match line_occurrences.get(&c) {
  8. Some(element) => *element += 1,
  9. None => line_occurrences.insert(c, 1),
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment