Add more fruits to the fruit basket

This commit is contained in:
Rock070 2023-12-30 17:04:03 +08:00
parent b2b6dad75e
commit 551793f249

View File

@ -11,15 +11,16 @@
// Execute `rustlings hint hashmaps1` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
use std::collections::HashMap;
fn fruit_basket() -> HashMap<String, u32> {
let mut basket = // TODO: declare your hash map here.
// TODO: declare your hash map here.
let mut basket = HashMap::new();
// Two bananas are already given for you :)
basket.insert(String::from("apple"), 1);
basket.insert(String::from("banana"), 2);
basket.insert(String::from("blue berry"), 3);
// TODO: Put more fruits in your basket here.