Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.30 KB | None | 0 0
  1. //this works    
  2. let clean_input = remove_non_chars(input);
  3.     for word in clean_input.split_whitespace() {
  4.         *word_count.entry(word).or_insert(0) += 1;
  5.     }
  6. //this doesn't
  7.     for word in remove_non_chars(input).split_whitespace() {
  8.         *word_count.entry(word).or_insert(0) += 1;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement