1
1
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
2
- --> $DIR/unwrap_used.rs:36 :17
2
+ --> $DIR/unwrap_used.rs:35 :17
3
3
|
4
4
LL | let _ = boxed_slice.get(1).unwrap();
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]`
@@ -11,7 +11,7 @@ LL | #![deny(clippy::get_unwrap)]
11
11
| ^^^^^^^^^^^^^^^^^^
12
12
13
13
error: used `unwrap()` on `an Option` value
14
- --> $DIR/unwrap_used.rs:36 :17
14
+ --> $DIR/unwrap_used.rs:35 :17
15
15
|
16
16
LL | let _ = boxed_slice.get(1).unwrap();
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -20,175 +20,175 @@ LL | let _ = boxed_slice.get(1).unwrap();
20
20
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
21
21
22
22
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
23
- --> $DIR/unwrap_used.rs:37 :17
23
+ --> $DIR/unwrap_used.rs:36 :17
24
24
|
25
25
LL | let _ = some_slice.get(0).unwrap();
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]`
27
27
28
28
error: used `unwrap()` on `an Option` value
29
- --> $DIR/unwrap_used.rs:37 :17
29
+ --> $DIR/unwrap_used.rs:36 :17
30
30
|
31
31
LL | let _ = some_slice.get(0).unwrap();
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
33
33
|
34
34
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
35
35
36
36
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
37
- --> $DIR/unwrap_used.rs:38 :17
37
+ --> $DIR/unwrap_used.rs:37 :17
38
38
|
39
39
LL | let _ = some_vec.get(0).unwrap();
40
40
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]`
41
41
42
42
error: used `unwrap()` on `an Option` value
43
- --> $DIR/unwrap_used.rs:38 :17
43
+ --> $DIR/unwrap_used.rs:37 :17
44
44
|
45
45
LL | let _ = some_vec.get(0).unwrap();
46
46
| ^^^^^^^^^^^^^^^^^^^^^^^^
47
47
|
48
48
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
49
49
50
50
error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
51
- --> $DIR/unwrap_used.rs:39 :17
51
+ --> $DIR/unwrap_used.rs:38 :17
52
52
|
53
53
LL | let _ = some_vecdeque.get(0).unwrap();
54
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]`
55
55
56
56
error: used `unwrap()` on `an Option` value
57
- --> $DIR/unwrap_used.rs:39 :17
57
+ --> $DIR/unwrap_used.rs:38 :17
58
58
|
59
59
LL | let _ = some_vecdeque.get(0).unwrap();
60
60
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
61
|
62
62
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
63
63
64
64
error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
65
- --> $DIR/unwrap_used.rs:40 :17
65
+ --> $DIR/unwrap_used.rs:39 :17
66
66
|
67
67
LL | let _ = some_hashmap.get(&1).unwrap();
68
68
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]`
69
69
70
70
error: used `unwrap()` on `an Option` value
71
- --> $DIR/unwrap_used.rs:40 :17
71
+ --> $DIR/unwrap_used.rs:39 :17
72
72
|
73
73
LL | let _ = some_hashmap.get(&1).unwrap();
74
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75
75
|
76
76
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
77
77
78
78
error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
79
- --> $DIR/unwrap_used.rs:41 :17
79
+ --> $DIR/unwrap_used.rs:40 :17
80
80
|
81
81
LL | let _ = some_btreemap.get(&1).unwrap();
82
82
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
83
83
84
84
error: used `unwrap()` on `an Option` value
85
- --> $DIR/unwrap_used.rs:41 :17
85
+ --> $DIR/unwrap_used.rs:40 :17
86
86
|
87
87
LL | let _ = some_btreemap.get(&1).unwrap();
88
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89
89
|
90
90
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
91
91
92
92
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
93
- --> $DIR/unwrap_used.rs:45 :21
93
+ --> $DIR/unwrap_used.rs:44 :21
94
94
|
95
95
LL | let _: u8 = *boxed_slice.get(1).unwrap();
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
97
97
98
98
error: used `unwrap()` on `an Option` value
99
- --> $DIR/unwrap_used.rs:45 :22
99
+ --> $DIR/unwrap_used.rs:44 :22
100
100
|
101
101
LL | let _: u8 = *boxed_slice.get(1).unwrap();
102
102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
103
|
104
104
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
105
105
106
106
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
107
- --> $DIR/unwrap_used.rs:50 :9
107
+ --> $DIR/unwrap_used.rs:49 :9
108
108
|
109
109
LL | *boxed_slice.get_mut(0).unwrap() = 1;
110
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
111
111
112
112
error: used `unwrap()` on `an Option` value
113
- --> $DIR/unwrap_used.rs:50 :10
113
+ --> $DIR/unwrap_used.rs:49 :10
114
114
|
115
115
LL | *boxed_slice.get_mut(0).unwrap() = 1;
116
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
117
|
118
118
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
119
119
120
120
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
121
- --> $DIR/unwrap_used.rs:51 :9
121
+ --> $DIR/unwrap_used.rs:50 :9
122
122
|
123
123
LL | *some_slice.get_mut(0).unwrap() = 1;
124
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
125
125
126
126
error: used `unwrap()` on `an Option` value
127
- --> $DIR/unwrap_used.rs:51 :10
127
+ --> $DIR/unwrap_used.rs:50 :10
128
128
|
129
129
LL | *some_slice.get_mut(0).unwrap() = 1;
130
130
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131
131
|
132
132
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
133
133
134
134
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
135
- --> $DIR/unwrap_used.rs:52 :9
135
+ --> $DIR/unwrap_used.rs:51 :9
136
136
|
137
137
LL | *some_vec.get_mut(0).unwrap() = 1;
138
138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
139
139
140
140
error: used `unwrap()` on `an Option` value
141
- --> $DIR/unwrap_used.rs:52 :10
141
+ --> $DIR/unwrap_used.rs:51 :10
142
142
|
143
143
LL | *some_vec.get_mut(0).unwrap() = 1;
144
144
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145
145
|
146
146
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
147
147
148
148
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
149
- --> $DIR/unwrap_used.rs:53 :9
149
+ --> $DIR/unwrap_used.rs:52 :9
150
150
|
151
151
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
153
153
154
154
error: used `unwrap()` on `an Option` value
155
- --> $DIR/unwrap_used.rs:53 :10
155
+ --> $DIR/unwrap_used.rs:52 :10
156
156
|
157
157
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
158
158
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159
159
|
160
160
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
161
161
162
162
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
163
- --> $DIR/unwrap_used.rs:65 :17
163
+ --> $DIR/unwrap_used.rs:64 :17
164
164
|
165
165
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
166
166
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
167
167
168
168
error: used `unwrap()` on `an Option` value
169
- --> $DIR/unwrap_used.rs:65 :17
169
+ --> $DIR/unwrap_used.rs:64 :17
170
170
|
171
171
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
172
172
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
173
173
|
174
174
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
175
175
176
176
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
177
- --> $DIR/unwrap_used.rs:66 :17
177
+ --> $DIR/unwrap_used.rs:65 :17
178
178
|
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
182
error: used `unwrap()` on `an Option` value
183
- --> $DIR/unwrap_used.rs:66 :17
183
+ --> $DIR/unwrap_used.rs:65 :17
184
184
|
185
185
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
186
186
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
187
187
|
188
188
= help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
189
189
190
190
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
191
- --> $DIR/unwrap_used.rs:73 :13
191
+ --> $DIR/unwrap_used.rs:72 :13
192
192
|
193
193
LL | let _ = boxed_slice.get(1).unwrap();
194
194
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]`
0 commit comments