mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 05:52:23 -05:00
feat: remove collections to hashmaps
This commit is contained in:
parent
2f7fd51304
commit
3c4c9c54c9
4 changed files with 9 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
// hashmap1.rs
|
||||
// hashmaps1.rs
|
||||
// A basket of fruits in the form of a hash map needs to be defined.
|
||||
// The key represents the name of the fruit and the value represents
|
||||
// how many of that particular fruit is in the basket. You have to put
|
||||
|
@ -8,7 +8,7 @@
|
|||
//
|
||||
// Make me compile and pass the tests!
|
||||
//
|
||||
// Execute the command `rustlings hint hashmap1` if you need
|
||||
// Execute the command `rustlings hint hashmaps1` if you need
|
||||
// hints.
|
||||
|
||||
// I AM NOT DONE
|
|
@ -1,4 +1,4 @@
|
|||
// hashmap2.rs
|
||||
// hashmaps2.rs
|
||||
|
||||
// A basket of fruits in the form of a hash map is given. The key
|
||||
// represents the name of the fruit and the value represents how many
|
||||
|
@ -9,7 +9,7 @@
|
|||
//
|
||||
// Make me pass the tests!
|
||||
//
|
||||
// Execute the command `rustlings hint hashmap2` if you need
|
||||
// Execute the command `rustlings hint hashmaps2` if you need
|
||||
// hints.
|
||||
|
||||
// I AM NOT DONE
|
10
info.toml
10
info.toml
|
@ -445,11 +445,11 @@ UNIX_EPOCH and SystemTime are declared in the std::time module. Add a use statem
|
|||
for these two to bring them into scope. You can use nested paths or the glob
|
||||
operator to bring these two in using only one line."""
|
||||
|
||||
# COLLECTIONS
|
||||
# HASHMAPS
|
||||
|
||||
[[exercises]]
|
||||
name = "hashmap1"
|
||||
path = "exercises/collections/hashmap1.rs"
|
||||
name = "hashmaps1"
|
||||
path = "exercises/hashmaps/hashmaps1.rs"
|
||||
mode = "test"
|
||||
hint = """
|
||||
Hint 1: Take a look at the return type of the function to figure out
|
||||
|
@ -459,8 +459,8 @@ Hint 2: Number of fruits should be at least 5. And you have to put
|
|||
"""
|
||||
|
||||
[[exercises]]
|
||||
name = "hashmap2"
|
||||
path = "exercises/collections/hashmap2.rs"
|
||||
name = "hashmaps2"
|
||||
path = "exercises/hashmaps/hashmaps2.rs"
|
||||
mode = "test"
|
||||
hint = """
|
||||
Use the `entry()` and `or_insert()` methods of `HashMap` to achieve this.
|
||||
|
|
Loading…
Reference in a new issue