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