@@ -10,7 +10,7 @@ note: the lint level is defined here
10
10
LL | #![deny(clippy::get_unwrap)]
11
11
| ^^^^^^^^^^^^^^^^^^
12
12
13
- error: used `unwrap()` on ` an Option` value
13
+ error: used `unwrap()` on an ` Option` value
14
14
--> $DIR/unwrap_used.rs:35:17
15
15
|
16
16
LL | let _ = boxed_slice.get(1).unwrap();
@@ -25,7 +25,7 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
25
25
LL | let _ = some_slice.get(0).unwrap();
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]`
27
27
28
- error: used `unwrap()` on ` an Option` value
28
+ error: used `unwrap()` on an ` Option` value
29
29
--> $DIR/unwrap_used.rs:36:17
30
30
|
31
31
LL | let _ = some_slice.get(0).unwrap();
@@ -39,7 +39,7 @@ error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more conc
39
39
LL | let _ = some_vec.get(0).unwrap();
40
40
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]`
41
41
42
- error: used `unwrap()` on ` an Option` value
42
+ error: used `unwrap()` on an ` Option` value
43
43
--> $DIR/unwrap_used.rs:37:17
44
44
|
45
45
LL | let _ = some_vec.get(0).unwrap();
@@ -53,7 +53,7 @@ error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more
53
53
LL | let _ = some_vecdeque.get(0).unwrap();
54
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]`
55
55
56
- error: used `unwrap()` on ` an Option` value
56
+ error: used `unwrap()` on an ` Option` value
57
57
--> $DIR/unwrap_used.rs:38:17
58
58
|
59
59
LL | let _ = some_vecdeque.get(0).unwrap();
@@ -67,7 +67,7 @@ error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more
67
67
LL | let _ = some_hashmap.get(&1).unwrap();
68
68
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]`
69
69
70
- error: used `unwrap()` on ` an Option` value
70
+ error: used `unwrap()` on an ` Option` value
71
71
--> $DIR/unwrap_used.rs:39:17
72
72
|
73
73
LL | let _ = some_hashmap.get(&1).unwrap();
@@ -81,7 +81,7 @@ error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more
81
81
LL | let _ = some_btreemap.get(&1).unwrap();
82
82
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
83
83
84
- error: used `unwrap()` on ` an Option` value
84
+ error: used `unwrap()` on an ` Option` value
85
85
--> $DIR/unwrap_used.rs:40:17
86
86
|
87
87
LL | let _ = some_btreemap.get(&1).unwrap();
@@ -95,7 +95,7 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
95
95
LL | let _: u8 = *boxed_slice.get(1).unwrap();
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
97
97
98
- error: used `unwrap()` on ` an Option` value
98
+ error: used `unwrap()` on an ` Option` value
99
99
--> $DIR/unwrap_used.rs:44:22
100
100
|
101
101
LL | let _: u8 = *boxed_slice.get(1).unwrap();
@@ -109,7 +109,7 @@ error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and mor
109
109
LL | *boxed_slice.get_mut(0).unwrap() = 1;
110
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
111
111
112
- error: used `unwrap()` on ` an Option` value
112
+ error: used `unwrap()` on an ` Option` value
113
113
--> $DIR/unwrap_used.rs:49:10
114
114
|
115
115
LL | *boxed_slice.get_mut(0).unwrap() = 1;
@@ -123,7 +123,7 @@ error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and mor
123
123
LL | *some_slice.get_mut(0).unwrap() = 1;
124
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
125
125
126
- error: used `unwrap()` on ` an Option` value
126
+ error: used `unwrap()` on an ` Option` value
127
127
--> $DIR/unwrap_used.rs:50:10
128
128
|
129
129
LL | *some_slice.get_mut(0).unwrap() = 1;
@@ -137,7 +137,7 @@ error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more
137
137
LL | *some_vec.get_mut(0).unwrap() = 1;
138
138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
139
139
140
- error: used `unwrap()` on ` an Option` value
140
+ error: used `unwrap()` on an ` Option` value
141
141
--> $DIR/unwrap_used.rs:51:10
142
142
|
143
143
LL | *some_vec.get_mut(0).unwrap() = 1;
@@ -151,7 +151,7 @@ error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and
151
151
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
153
153
154
- error: used `unwrap()` on ` an Option` value
154
+ error: used `unwrap()` on an ` Option` value
155
155
--> $DIR/unwrap_used.rs:52:10
156
156
|
157
157
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
@@ -165,7 +165,7 @@ error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more conc
165
165
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
166
166
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
167
167
168
- error: used `unwrap()` on ` an Option` value
168
+ error: used `unwrap()` on an ` Option` value
169
169
--> $DIR/unwrap_used.rs:64:17
170
170
|
171
171
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
@@ -179,7 +179,7 @@ error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more
179
179
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
180
180
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
181
181
182
- error: used `unwrap()` on ` an Option` value
182
+ error: used `unwrap()` on an ` Option` value
183
183
--> $DIR/unwrap_used.rs:65:17
184
184
|
185
185
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
0 commit comments