@@ -2,75 +2,75 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
2
2
--> $DIR/get_unwrap.rs:27:17
3
3
|
4
4
27 | let _ = boxed_slice.get(1).unwrap();
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &boxed_slice[1]) `
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]`
6
6
|
7
7
= note: `-D clippy::get-unwrap` implied by `-D warnings`
8
8
9
9
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
10
10
--> $DIR/get_unwrap.rs:28:17
11
11
|
12
12
28 | let _ = some_slice.get(0).unwrap();
13
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &some_slice[0]) `
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]`
14
14
15
15
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
16
16
--> $DIR/get_unwrap.rs:29:17
17
17
|
18
18
29 | let _ = some_vec.get(0).unwrap();
19
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &some_vec[0]) `
19
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]`
20
20
21
21
error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
22
22
--> $DIR/get_unwrap.rs:30:17
23
23
|
24
24
30 | let _ = some_vecdeque.get(0).unwrap();
25
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &some_vecdeque[0]) `
25
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]`
26
26
27
27
error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
28
28
--> $DIR/get_unwrap.rs:31:17
29
29
|
30
30
31 | let _ = some_hashmap.get(&1).unwrap();
31
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &some_hashmap[&1]) `
31
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]`
32
32
33
33
error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
34
34
--> $DIR/get_unwrap.rs:32:17
35
35
|
36
36
32 | let _ = some_btreemap.get(&1).unwrap();
37
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &some_btreemap[&1]) `
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
38
38
39
39
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
40
40
--> $DIR/get_unwrap.rs:37:10
41
41
|
42
42
37 | *boxed_slice.get_mut(0).unwrap() = 1;
43
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &mut boxed_slice[0]) `
43
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut boxed_slice[0]`
44
44
45
45
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
46
46
--> $DIR/get_unwrap.rs:38:10
47
47
|
48
48
38 | *some_slice.get_mut(0).unwrap() = 1;
49
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &mut some_slice[0]) `
49
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut some_slice[0]`
50
50
51
51
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
52
52
--> $DIR/get_unwrap.rs:39:10
53
53
|
54
54
39 | *some_vec.get_mut(0).unwrap() = 1;
55
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &mut some_vec[0]) `
55
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut some_vec[0]`
56
56
57
57
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
58
58
--> $DIR/get_unwrap.rs:40:10
59
59
|
60
60
40 | *some_vecdeque.get_mut(0).unwrap() = 1;
61
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `( &mut some_vecdeque[0]) `
61
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&mut some_vecdeque[0]`
62
62
63
63
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
64
64
--> $DIR/get_unwrap.rs:48:17
65
65
|
66
66
48 | let _ = some_vec.get(0..1).unwrap().to_vec();
67
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(& some_vec[0..1]) `
67
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
68
68
69
69
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
70
70
--> $DIR/get_unwrap.rs:49:17
71
71
|
72
72
49 | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
73
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `(&mut some_vec[0..1]) `
73
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
74
74
75
75
error: aborting due to 12 previous errors
76
76
0 commit comments