Post AYMbk85CUcFRxMq0xM by jsonstein@masto.deoan.org
 (DIR) More posts by jsonstein@masto.deoan.org
 (DIR) Post #AYMbk85CUcFRxMq0xM by jsonstein@masto.deoan.org
       2023-08-03T13:36:23Z
       
       0 likes, 1 repeats
       
       two approaches to defining a thingie of type HashMap: A) define before first use:let mut scores: HashMap<String,i32> = HashMap::new();[...] B) define at first use: let mut scores2 = HashMap::new();[...]scores2.insert(String::from("Yellow"), 10);[...]---which do you prefer?#LearningRust