fix(collections): Naming exercises for vectors and hashmap

This commit is contained in:
Mickael Fortunato 2021-03-18 18:39:22 +01:00
parent 0d894e6ff7
commit bef39b1259
2 changed files with 5 additions and 10 deletions

View File

@ -28,11 +28,6 @@ mod tests {
let v: Vec<i32> = (1..).filter(|x| x % 2 == 0).take(5).collect(); let v: Vec<i32> = (1..).filter(|x| x % 2 == 0).take(5).collect();
let ans = vec_loop(v.clone()); let ans = vec_loop(v.clone());
assert_eq!( assert_eq!(ans, v.iter().map(|x| x * 2).collect::<Vec<i32>>());
ans,
v.iter()
.map(|x| x * 2)
.collect::<Vec<i32>>()
);
} }
} }

View File

@ -359,7 +359,7 @@ each constant."""
# COLLECTIONS # COLLECTIONS
[[exercises]] [[exercises]]
name = "collections1" name = "vec1"
path = "exercises/collections/vec1.rs" path = "exercises/collections/vec1.rs"
mode = "test" mode = "test"
hint = """ hint = """
@ -373,7 +373,7 @@ of the Rust book to learn more.
""" """
[[exercises]] [[exercises]]
name = "collections2" name = "vec2"
path = "exercises/collections/vec2.rs" path = "exercises/collections/vec2.rs"
mode = "test" mode = "test"
hint = """ hint = """
@ -383,7 +383,7 @@ Hint 2: Check the suggestion from the compiler error ;)
""" """
[[exercises]] [[exercises]]
name = "collections3" name = "hashmap1"
path = "exercises/collections/hashmap1.rs" path = "exercises/collections/hashmap1.rs"
mode = "test" mode = "test"
hint = """ hint = """
@ -394,7 +394,7 @@ Hint 2: Number of fruits should be at least 5. And you have to put
""" """
[[exercises]] [[exercises]]
name = "collections4" name = "hashmap2"
path = "exercises/collections/hashmap2.rs" path = "exercises/collections/hashmap2.rs"
mode = "test" mode = "test"
hint = """ hint = """