mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-04 01:39:18 +00:00
Add more fruits to the fruit basket
This commit is contained in:
parent
b2b6dad75e
commit
551793f249
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user