@@ -10,7 +10,7 @@ note: the lint level is defined here
1010LL | #![deny(clippy::get_unwrap)]
1111 | ^^^^^^^^^^^^^^^^^^
1212
13- error: used `unwrap()` on ` an Option` value
13+ error: used `unwrap()` on an ` Option` value
1414 --> $DIR/unwrap_used.rs:35:17
1515 |
1616LL | let _ = boxed_slice.get(1).unwrap();
@@ -25,7 +25,7 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
2525LL | let _ = some_slice.get(0).unwrap();
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]`
2727
28- error: used `unwrap()` on ` an Option` value
28+ error: used `unwrap()` on an ` Option` value
2929 --> $DIR/unwrap_used.rs:36:17
3030 |
3131LL | let _ = some_slice.get(0).unwrap();
@@ -39,7 +39,7 @@ error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more conc
3939LL | let _ = some_vec.get(0).unwrap();
4040 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]`
4141
42- error: used `unwrap()` on ` an Option` value
42+ error: used `unwrap()` on an ` Option` value
4343 --> $DIR/unwrap_used.rs:37:17
4444 |
4545LL | let _ = some_vec.get(0).unwrap();
@@ -53,7 +53,7 @@ error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more
5353LL | let _ = some_vecdeque.get(0).unwrap();
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]`
5555
56- error: used `unwrap()` on ` an Option` value
56+ error: used `unwrap()` on an ` Option` value
5757 --> $DIR/unwrap_used.rs:38:17
5858 |
5959LL | let _ = some_vecdeque.get(0).unwrap();
@@ -67,7 +67,7 @@ error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more
6767LL | let _ = some_hashmap.get(&1).unwrap();
6868 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]`
6969
70- error: used `unwrap()` on ` an Option` value
70+ error: used `unwrap()` on an ` Option` value
7171 --> $DIR/unwrap_used.rs:39:17
7272 |
7373LL | let _ = some_hashmap.get(&1).unwrap();
@@ -81,7 +81,7 @@ error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more
8181LL | let _ = some_btreemap.get(&1).unwrap();
8282 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
8383
84- error: used `unwrap()` on ` an Option` value
84+ error: used `unwrap()` on an ` Option` value
8585 --> $DIR/unwrap_used.rs:40:17
8686 |
8787LL | let _ = some_btreemap.get(&1).unwrap();
@@ -95,7 +95,7 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
9595LL | let _: u8 = *boxed_slice.get(1).unwrap();
9696 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
9797
98- error: used `unwrap()` on ` an Option` value
98+ error: used `unwrap()` on an ` Option` value
9999 --> $DIR/unwrap_used.rs:44:22
100100 |
101101LL | 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
109109LL | *boxed_slice.get_mut(0).unwrap() = 1;
110110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
111111
112- error: used `unwrap()` on ` an Option` value
112+ error: used `unwrap()` on an ` Option` value
113113 --> $DIR/unwrap_used.rs:49:10
114114 |
115115LL | *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
123123LL | *some_slice.get_mut(0).unwrap() = 1;
124124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
125125
126- error: used `unwrap()` on ` an Option` value
126+ error: used `unwrap()` on an ` Option` value
127127 --> $DIR/unwrap_used.rs:50:10
128128 |
129129LL | *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
137137LL | *some_vec.get_mut(0).unwrap() = 1;
138138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
139139
140- error: used `unwrap()` on ` an Option` value
140+ error: used `unwrap()` on an ` Option` value
141141 --> $DIR/unwrap_used.rs:51:10
142142 |
143143LL | *some_vec.get_mut(0).unwrap() = 1;
@@ -151,7 +151,7 @@ error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and
151151LL | *some_vecdeque.get_mut(0).unwrap() = 1;
152152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
153153
154- error: used `unwrap()` on ` an Option` value
154+ error: used `unwrap()` on an ` Option` value
155155 --> $DIR/unwrap_used.rs:52:10
156156 |
157157LL | *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
165165LL | let _ = some_vec.get(0..1).unwrap().to_vec();
166166 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
167167
168- error: used `unwrap()` on ` an Option` value
168+ error: used `unwrap()` on an ` Option` value
169169 --> $DIR/unwrap_used.rs:64:17
170170 |
171171LL | 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
179179LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
180180 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
181181
182- error: used `unwrap()` on ` an Option` value
182+ error: used `unwrap()` on an ` Option` value
183183 --> $DIR/unwrap_used.rs:65:17
184184 |
185185LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
0 commit comments