@@ -12,7 +12,8 @@ error: used `unwrap()` on an `Option` value
12
12
LL | let _ = boxed_slice.get(1).unwrap();
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
|
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
16
17
= note: `-D clippy::unwrap-used` implied by `-D warnings`
17
18
18
19
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
@@ -27,7 +28,8 @@ error: used `unwrap()` on an `Option` value
27
28
LL | let _ = some_slice.get(0).unwrap();
28
29
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
29
30
|
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
31
33
32
34
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
33
35
--> $DIR/unwrap_used.rs:40:17
@@ -41,7 +43,8 @@ error: used `unwrap()` on an `Option` value
41
43
LL | let _ = some_vec.get(0).unwrap();
42
44
| ^^^^^^^^^^^^^^^^^^^^^^^^
43
45
|
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
45
48
46
49
error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
47
50
--> $DIR/unwrap_used.rs:41:17
@@ -55,7 +58,8 @@ error: used `unwrap()` on an `Option` value
55
58
LL | let _ = some_vecdeque.get(0).unwrap();
56
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57
60
|
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
59
63
60
64
error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
61
65
--> $DIR/unwrap_used.rs:42:17
@@ -69,7 +73,8 @@ error: used `unwrap()` on an `Option` value
69
73
LL | let _ = some_hashmap.get(&1).unwrap();
70
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71
75
|
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
73
78
74
79
error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
75
80
--> $DIR/unwrap_used.rs:43:17
@@ -83,7 +88,8 @@ error: used `unwrap()` on an `Option` value
83
88
LL | let _ = some_btreemap.get(&1).unwrap();
84
89
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
90
|
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
87
93
88
94
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
89
95
--> $DIR/unwrap_used.rs:47:21
@@ -97,7 +103,8 @@ error: used `unwrap()` on an `Option` value
97
103
LL | let _: u8 = *boxed_slice.get(1).unwrap();
98
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
99
105
|
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
101
108
102
109
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
103
110
--> $DIR/unwrap_used.rs:52:9
@@ -111,7 +118,8 @@ error: used `unwrap()` on an `Option` value
111
118
LL | *boxed_slice.get_mut(0).unwrap() = 1;
112
119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
120
|
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
115
123
116
124
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
117
125
--> $DIR/unwrap_used.rs:53:9
@@ -125,7 +133,8 @@ error: used `unwrap()` on an `Option` value
125
133
LL | *some_slice.get_mut(0).unwrap() = 1;
126
134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
135
|
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
129
138
130
139
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
131
140
--> $DIR/unwrap_used.rs:54:9
@@ -139,7 +148,8 @@ error: used `unwrap()` on an `Option` value
139
148
LL | *some_vec.get_mut(0).unwrap() = 1;
140
149
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141
150
|
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
143
153
144
154
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
145
155
--> $DIR/unwrap_used.rs:55:9
@@ -153,7 +163,8 @@ error: used `unwrap()` on an `Option` value
153
163
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
154
164
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155
165
|
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
157
168
158
169
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
159
170
--> $DIR/unwrap_used.rs:67:17
@@ -167,7 +178,8 @@ error: used `unwrap()` on an `Option` value
167
178
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
168
179
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
169
180
|
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
171
183
172
184
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
173
185
--> $DIR/unwrap_used.rs:68:17
@@ -181,7 +193,8 @@ error: used `unwrap()` on an `Option` value
181
193
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
182
194
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183
195
|
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
185
198
186
199
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
187
200
--> $DIR/unwrap_used.rs:75:13
0 commit comments