Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saiyuan233 committed Dec 24, 2024
1 parent 843acfa commit b8b8305
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exercises/hashmaps/hashmaps1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@
// 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.
let mut basket = HashMap::new();// TODO: declare your hash map here.

// Two bananas are already given for you :)
basket.insert(String::from("banana"), 2);

// TODO: Put more fruits in your basket here.
basket.insert(String::from("apple"), 1);
basket.insert(String::from("orange"), 2);

basket
}
Expand Down

0 comments on commit b8b8305

Please sign in to comment.