@@ -36,41 +36,47 @@ error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more
36
36
LL | let _ = some_btreemap.get(&1).unwrap();
37
37
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
38
38
39
+ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
40
+ --> $DIR/get_unwrap.rs:50:21
41
+ |
42
+ LL | let _: u8 = *boxed_slice.get(1).unwrap();
43
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
44
+
39
45
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
40
- --> $DIR/get_unwrap.rs:53 :9
46
+ --> $DIR/get_unwrap.rs:55 :9
41
47
|
42
48
LL | *boxed_slice.get_mut(0).unwrap() = 1;
43
49
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
44
50
45
51
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
46
- --> $DIR/get_unwrap.rs:54 :9
52
+ --> $DIR/get_unwrap.rs:56 :9
47
53
|
48
54
LL | *some_slice.get_mut(0).unwrap() = 1;
49
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
50
56
51
57
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
52
- --> $DIR/get_unwrap.rs:55 :9
58
+ --> $DIR/get_unwrap.rs:57 :9
53
59
|
54
60
LL | *some_vec.get_mut(0).unwrap() = 1;
55
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
56
62
57
63
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
58
- --> $DIR/get_unwrap.rs:56 :9
64
+ --> $DIR/get_unwrap.rs:58 :9
59
65
|
60
66
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
61
67
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
62
68
63
69
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
64
- --> $DIR/get_unwrap.rs:65 :17
70
+ --> $DIR/get_unwrap.rs:67 :17
65
71
|
66
72
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
67
73
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
68
74
69
75
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
70
- --> $DIR/get_unwrap.rs:66 :17
76
+ --> $DIR/get_unwrap.rs:68 :17
71
77
|
72
78
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
73
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
74
80
75
- error: aborting due to 12 previous errors
81
+ error: aborting due to 13 previous errors
76
82
0 commit comments