@@ -12,7 +12,8 @@ error: used `unwrap()` on an `Option` value
1212LL | let _ = boxed_slice.get(1).unwrap();
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414 |
15- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
15+ = note: if this value is `None`, it will panic
16+ = help: consider using `expect()` to provide a better panic message
1617 = note: `-D clippy::unwrap-used` implied by `-D warnings`
1718
1819error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
@@ -27,7 +28,8 @@ error: used `unwrap()` on an `Option` value
2728LL | let _ = some_slice.get(0).unwrap();
2829 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
2930 |
30- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
31+ = note: if this value is `None`, it will panic
32+ = help: consider using `expect()` to provide a better panic message
3133
3234error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
3335 --> $DIR/unwrap_used.rs:40:17
@@ -41,7 +43,8 @@ error: used `unwrap()` on an `Option` value
4143LL | let _ = some_vec.get(0).unwrap();
4244 | ^^^^^^^^^^^^^^^^^^^^^^^^
4345 |
44- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
46+ = note: if this value is `None`, it will panic
47+ = help: consider using `expect()` to provide a better panic message
4548
4649error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
4750 --> $DIR/unwrap_used.rs:41:17
@@ -55,7 +58,8 @@ error: used `unwrap()` on an `Option` value
5558LL | let _ = some_vecdeque.get(0).unwrap();
5659 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5760 |
58- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
61+ = note: if this value is `None`, it will panic
62+ = help: consider using `expect()` to provide a better panic message
5963
6064error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
6165 --> $DIR/unwrap_used.rs:42:17
@@ -69,7 +73,8 @@ error: used `unwrap()` on an `Option` value
6973LL | let _ = some_hashmap.get(&1).unwrap();
7074 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7175 |
72- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
76+ = note: if this value is `None`, it will panic
77+ = help: consider using `expect()` to provide a better panic message
7378
7479error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
7580 --> $DIR/unwrap_used.rs:43:17
@@ -83,7 +88,8 @@ error: used `unwrap()` on an `Option` value
8388LL | let _ = some_btreemap.get(&1).unwrap();
8489 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8590 |
86- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
91+ = note: if this value is `None`, it will panic
92+ = help: consider using `expect()` to provide a better panic message
8793
8894error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
8995 --> $DIR/unwrap_used.rs:47:21
@@ -97,7 +103,8 @@ error: used `unwrap()` on an `Option` value
97103LL | let _: u8 = *boxed_slice.get(1).unwrap();
98104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
99105 |
100- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
106+ = note: if this value is `None`, it will panic
107+ = help: consider using `expect()` to provide a better panic message
101108
102109error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
103110 --> $DIR/unwrap_used.rs:52:9
@@ -111,7 +118,8 @@ error: used `unwrap()` on an `Option` value
111118LL | *boxed_slice.get_mut(0).unwrap() = 1;
112119 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113120 |
114- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
121+ = note: if this value is `None`, it will panic
122+ = help: consider using `expect()` to provide a better panic message
115123
116124error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
117125 --> $DIR/unwrap_used.rs:53:9
@@ -125,7 +133,8 @@ error: used `unwrap()` on an `Option` value
125133LL | *some_slice.get_mut(0).unwrap() = 1;
126134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127135 |
128- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
136+ = note: if this value is `None`, it will panic
137+ = help: consider using `expect()` to provide a better panic message
129138
130139error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
131140 --> $DIR/unwrap_used.rs:54:9
@@ -139,7 +148,8 @@ error: used `unwrap()` on an `Option` value
139148LL | *some_vec.get_mut(0).unwrap() = 1;
140149 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141150 |
142- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
151+ = note: if this value is `None`, it will panic
152+ = help: consider using `expect()` to provide a better panic message
143153
144154error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
145155 --> $DIR/unwrap_used.rs:55:9
@@ -153,7 +163,8 @@ error: used `unwrap()` on an `Option` value
153163LL | *some_vecdeque.get_mut(0).unwrap() = 1;
154164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155165 |
156- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
166+ = note: if this value is `None`, it will panic
167+ = help: consider using `expect()` to provide a better panic message
157168
158169error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
159170 --> $DIR/unwrap_used.rs:67:17
@@ -167,7 +178,8 @@ error: used `unwrap()` on an `Option` value
167178LL | let _ = some_vec.get(0..1).unwrap().to_vec();
168179 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
169180 |
170- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
181+ = note: if this value is `None`, it will panic
182+ = help: consider using `expect()` to provide a better panic message
171183
172184error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
173185 --> $DIR/unwrap_used.rs:68:17
@@ -181,7 +193,8 @@ error: used `unwrap()` on an `Option` value
181193LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
182194 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183195 |
184- = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
196+ = note: if this value is `None`, it will panic
197+ = help: consider using `expect()` to provide a better panic message
185198
186199error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
187200 --> $DIR/unwrap_used.rs:75:13
0 commit comments