mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 10:03:30 +02:00
progress(modules + hashmaps): finished modules and almost done hashmaps
This commit is contained in:
@@ -9,10 +9,11 @@ use std::collections::HashMap;
|
||||
fn fruit_basket() -> HashMap<String, u32> {
|
||||
// TODO: Declare the hash map.
|
||||
// let mut basket =
|
||||
|
||||
let mut basket = HashMap::new();
|
||||
// Two bananas are already given for you :)
|
||||
basket.insert(String::from("banana"), 2);
|
||||
|
||||
basket.insert(String::from("apple"), 2);
|
||||
basket.insert(String::from("mango"), 1);
|
||||
// TODO: Put more fruits in your basket.
|
||||
|
||||
basket
|
||||
|
||||
Reference in New Issue
Block a user