File tree Expand file tree Collapse file tree 5 files changed +11
-20
lines changed Expand file tree Collapse file tree 5 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 8
8
//
9
9
// Make me compile and pass the tests!
10
10
//
11
- // Execute the command `rustlings hint collections3 ` if you need
11
+ // Execute the command `rustlings hint hashmap1 ` if you need
12
12
// hints.
13
13
14
14
// I AM NOT DONE
@@ -39,8 +39,6 @@ mod tests {
39
39
#[ test]
40
40
fn at_least_five_fruits ( ) {
41
41
let basket = fruit_basket ( ) ;
42
- assert ! ( basket
43
- . values( )
44
- . sum:: <u32 >( ) >= 5 ) ;
42
+ assert ! ( basket. values( ) . sum:: <u32 >( ) >= 5 ) ;
45
43
}
46
44
}
Original file line number Diff line number Diff line change 9
9
//
10
10
// Make me pass the tests!
11
11
//
12
- // Execute the command `rustlings hint collections4 ` if you need
12
+ // Execute the command `rustlings hint hashmap2 ` if you need
13
13
// hints.
14
14
15
15
// I AM NOT DONE
@@ -75,9 +75,7 @@ mod tests {
75
75
fn greater_than_eleven_fruits ( ) {
76
76
let mut basket = get_fruit_basket ( ) ;
77
77
fruit_basket ( & mut basket) ;
78
- let count = basket
79
- . values ( )
80
- . sum :: < u32 > ( ) ;
78
+ let count = basket. values ( ) . sum :: < u32 > ( ) ;
81
79
assert ! ( count > 11 ) ;
82
80
}
83
81
}
Original file line number Diff line number Diff line change 2
2
// Your task is to create a `Vec` which holds the exact same elements
3
3
// as in the array `a`.
4
4
// Make me compile and pass the test!
5
- // Execute the command `rustlings hint collections1 ` if you need hints.
5
+ // Execute the command `rustlings hint vec1 ` if you need hints.
6
6
7
7
// I AM NOT DONE
8
8
Original file line number Diff line number Diff line change 4
4
//
5
5
// Make me pass the test!
6
6
//
7
- // Execute the command `rustlings hint collections2 ` if you need
7
+ // Execute the command `rustlings hint vec2 ` if you need
8
8
// hints.
9
9
10
10
// I AM NOT DONE
@@ -28,11 +28,6 @@ mod tests {
28
28
let v: Vec < i32 > = ( 1 ..) . filter ( |x| x % 2 == 0 ) . take ( 5 ) . collect ( ) ;
29
29
let ans = vec_loop ( v. clone ( ) ) ;
30
30
31
- assert_eq ! (
32
- ans,
33
- v. iter( )
34
- . map( |x| x * 2 )
35
- . collect:: <Vec <i32 >>( )
36
- ) ;
31
+ assert_eq ! ( ans, v. iter( ) . map( |x| x * 2 ) . collect:: <Vec <i32 >>( ) ) ;
37
32
}
38
33
}
Original file line number Diff line number Diff line change @@ -359,7 +359,7 @@ each constant."""
359
359
# COLLECTIONS
360
360
361
361
[[exercises ]]
362
- name = " collections1 "
362
+ name = " vec1 "
363
363
path = " exercises/collections/vec1.rs"
364
364
mode = " test"
365
365
hint = """
@@ -373,7 +373,7 @@ of the Rust book to learn more.
373
373
"""
374
374
375
375
[[exercises ]]
376
- name = " collections2 "
376
+ name = " vec2 "
377
377
path = " exercises/collections/vec2.rs"
378
378
mode = " test"
379
379
hint = """
@@ -383,7 +383,7 @@ Hint 2: Check the suggestion from the compiler error ;)
383
383
"""
384
384
385
385
[[exercises ]]
386
- name = " collections3 "
386
+ name = " hashmap1 "
387
387
path = " exercises/collections/hashmap1.rs"
388
388
mode = " test"
389
389
hint = """
@@ -394,7 +394,7 @@ Hint 2: Number of fruits should be at least 5. And you have to put
394
394
"""
395
395
396
396
[[exercises ]]
397
- name = " collections4 "
397
+ name = " hashmap2 "
398
398
path = " exercises/collections/hashmap2.rs"
399
399
mode = " test"
400
400
hint = """
You can’t perform that action at this time.
0 commit comments