← Quit0 / 0 correct
RustMedium1 of 20

What is the idiomatic, single-lookup way to count word frequencies?

let mut counts: HashMap<&str, usize> = HashMap::new();
for w in text.split_whitespace() {
    // ?
}