首先遍历代码, text.split_whitespace 遍历代码text 以空格位分割
map.entry(word).or_insert(0); 若代码内部不存在遍历Word 则or_insert
新增K.V 并返回当前代码V,若内部存在word 则由.entry(word)返回当前K的V
进行+1 count “”代表解引用
use std::collections::HashMap;
let text = "hello world wonderful world";
let mut map = HashMap::new();
for word in text.split_whitespace() {