@@ -89,135 +89,103 @@ LL | let _ = some_btreemap.get(&1).unwrap();
8989 |
9090 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
9191
92- error: used `unwrap()` on `an Option` value
93- --> $DIR/get_unwrap.rs:42:17
94- |
95- LL | let _ = false_positive.get(0).unwrap();
96- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97- |
98- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
99-
10092error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
101- --> $DIR/get_unwrap.rs:44 :21
93+ --> $DIR/get_unwrap.rs:45 :21
10294 |
10395LL | let _: u8 = *boxed_slice.get(1).unwrap();
10496 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
10597
10698error: used `unwrap()` on `an Option` value
107- --> $DIR/get_unwrap.rs:44 :22
99+ --> $DIR/get_unwrap.rs:45 :22
108100 |
109101LL | let _: u8 = *boxed_slice.get(1).unwrap();
110102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
111103 |
112104 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
113105
114106error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
115- --> $DIR/get_unwrap.rs:49 :9
107+ --> $DIR/get_unwrap.rs:50 :9
116108 |
117109LL | *boxed_slice.get_mut(0).unwrap() = 1;
118110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
119111
120112error: used `unwrap()` on `an Option` value
121- --> $DIR/get_unwrap.rs:49 :10
113+ --> $DIR/get_unwrap.rs:50 :10
122114 |
123115LL | *boxed_slice.get_mut(0).unwrap() = 1;
124116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125117 |
126118 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
127119
128120error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
129- --> $DIR/get_unwrap.rs:50 :9
121+ --> $DIR/get_unwrap.rs:51 :9
130122 |
131123LL | *some_slice.get_mut(0).unwrap() = 1;
132124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
133125
134126error: used `unwrap()` on `an Option` value
135- --> $DIR/get_unwrap.rs:50 :10
127+ --> $DIR/get_unwrap.rs:51 :10
136128 |
137129LL | *some_slice.get_mut(0).unwrap() = 1;
138130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139131 |
140132 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
141133
142134error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
143- --> $DIR/get_unwrap.rs:51 :9
135+ --> $DIR/get_unwrap.rs:52 :9
144136 |
145137LL | *some_vec.get_mut(0).unwrap() = 1;
146138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
147139
148140error: used `unwrap()` on `an Option` value
149- --> $DIR/get_unwrap.rs:51 :10
141+ --> $DIR/get_unwrap.rs:52 :10
150142 |
151143LL | *some_vec.get_mut(0).unwrap() = 1;
152144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153145 |
154146 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
155147
156148error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
157- --> $DIR/get_unwrap.rs:52 :9
149+ --> $DIR/get_unwrap.rs:53 :9
158150 |
159151LL | *some_vecdeque.get_mut(0).unwrap() = 1;
160152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
161153
162154error: used `unwrap()` on `an Option` value
163- --> $DIR/get_unwrap.rs:52 :10
155+ --> $DIR/get_unwrap.rs:53 :10
164156 |
165157LL | *some_vecdeque.get_mut(0).unwrap() = 1;
166158 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
167159 |
168160 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
169161
170- error: used `unwrap()` on `an Option` value
171- --> $DIR/get_unwrap.rs:54:10
172- |
173- LL | *some_hashmap.get_mut(&1).unwrap() = 'b';
174- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175- |
176- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
177-
178- error: used `unwrap()` on `an Option` value
179- --> $DIR/get_unwrap.rs:55:10
180- |
181- LL | *some_btreemap.get_mut(&1).unwrap() = 'b';
182- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183- |
184- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
185-
186- error: used `unwrap()` on `an Option` value
187- --> $DIR/get_unwrap.rs:56:10
188- |
189- LL | *false_positive.get_mut(0).unwrap() = 1;
190- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191- |
192- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
193-
194162error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
195- --> $DIR/get_unwrap.rs:61 :17
163+ --> $DIR/get_unwrap.rs:65 :17
196164 |
197165LL | let _ = some_vec.get(0..1).unwrap().to_vec();
198166 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
199167
200168error: used `unwrap()` on `an Option` value
201- --> $DIR/get_unwrap.rs:61 :17
169+ --> $DIR/get_unwrap.rs:65 :17
202170 |
203171LL | let _ = some_vec.get(0..1).unwrap().to_vec();
204172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
205173 |
206174 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
207175
208176error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
209- --> $DIR/get_unwrap.rs:62 :17
177+ --> $DIR/get_unwrap.rs:66 :17
210178 |
211179LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
212180 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
213181
214182error: used `unwrap()` on `an Option` value
215- --> $DIR/get_unwrap.rs:62 :17
183+ --> $DIR/get_unwrap.rs:66 :17
216184 |
217185LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
218186 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
219187 |
220188 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
221189
222- error: aborting due to 30 previous errors
190+ error: aborting due to 26 previous errors
223191
0 commit comments