mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-03 09:19:18 +00:00
commit
7fb4acf21a
@ -11,7 +11,7 @@
|
||||
// Execute `rustlings hint hashmaps1` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
//
|
||||
// Make me pass the tests!
|
||||
//
|
||||
// Execute `rustlings hint hashmaps2` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
|
||||
|
||||
|
||||
@ -46,6 +45,8 @@ fn fruit_basket(basket: &mut HashMap<Fruit, u32>) {
|
||||
basket.insert(fruit,1);
|
||||
}
|
||||
}
|
||||
// Calculate the total count of fruits
|
||||
let total_count: u32 = basket.values().sum();
|
||||
|
||||
let total_count:u32 = basket.values().sum();
|
||||
if total_count <=11{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user