|
1 | 1 | error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise |
2 | | - --> $DIR/get_unwrap.rs:33:17 |
| 2 | + --> $DIR/get_unwrap.rs:34:17 |
3 | 3 | | |
4 | 4 | LL | let _ = boxed_slice.get(1).unwrap(); |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]` |
6 | 6 | | |
7 | | - = note: `-D clippy::get-unwrap` implied by `-D warnings` |
| 7 | +note: lint level defined here |
| 8 | + --> $DIR/get_unwrap.rs:3:9 |
| 9 | + | |
| 10 | +LL | #![deny(clippy::get_unwrap)] |
| 11 | + | ^^^^^^^^^^^^^^^^^^ |
8 | 12 |
|
9 | 13 | error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise |
10 | | - --> $DIR/get_unwrap.rs:34:17 |
| 14 | + --> $DIR/get_unwrap.rs:35:17 |
11 | 15 | | |
12 | 16 | LL | let _ = some_slice.get(0).unwrap(); |
13 | 17 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]` |
14 | 18 |
|
15 | 19 | error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise |
16 | | - --> $DIR/get_unwrap.rs:35:17 |
| 20 | + --> $DIR/get_unwrap.rs:36:17 |
17 | 21 | | |
18 | 22 | LL | let _ = some_vec.get(0).unwrap(); |
19 | 23 | | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]` |
20 | 24 |
|
21 | 25 | error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise |
22 | | - --> $DIR/get_unwrap.rs:36:17 |
| 26 | + --> $DIR/get_unwrap.rs:37:17 |
23 | 27 | | |
24 | 28 | LL | let _ = some_vecdeque.get(0).unwrap(); |
25 | 29 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]` |
26 | 30 |
|
27 | 31 | error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise |
28 | | - --> $DIR/get_unwrap.rs:37:17 |
| 32 | + --> $DIR/get_unwrap.rs:38:17 |
29 | 33 | | |
30 | 34 | LL | let _ = some_hashmap.get(&1).unwrap(); |
31 | 35 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]` |
32 | 36 |
|
33 | 37 | error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise |
34 | | - --> $DIR/get_unwrap.rs:38:17 |
| 38 | + --> $DIR/get_unwrap.rs:39:17 |
35 | 39 | | |
36 | 40 | LL | let _ = some_btreemap.get(&1).unwrap(); |
37 | 41 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]` |
38 | 42 |
|
39 | 43 | error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise |
40 | | - --> $DIR/get_unwrap.rs:41:21 |
| 44 | + --> $DIR/get_unwrap.rs:42:21 |
41 | 45 | | |
42 | 46 | LL | let _: u8 = *boxed_slice.get(1).unwrap(); |
43 | 47 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]` |
44 | 48 |
|
45 | 49 | error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise |
46 | | - --> $DIR/get_unwrap.rs:46:9 |
| 50 | + --> $DIR/get_unwrap.rs:47:9 |
47 | 51 | | |
48 | 52 | LL | *boxed_slice.get_mut(0).unwrap() = 1; |
49 | 53 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]` |
50 | 54 |
|
51 | 55 | error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise |
52 | | - --> $DIR/get_unwrap.rs:47:9 |
| 56 | + --> $DIR/get_unwrap.rs:48:9 |
53 | 57 | | |
54 | 58 | LL | *some_slice.get_mut(0).unwrap() = 1; |
55 | 59 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]` |
56 | 60 |
|
57 | 61 | error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise |
58 | | - --> $DIR/get_unwrap.rs:48:9 |
| 62 | + --> $DIR/get_unwrap.rs:49:9 |
59 | 63 | | |
60 | 64 | LL | *some_vec.get_mut(0).unwrap() = 1; |
61 | 65 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]` |
62 | 66 |
|
63 | 67 | error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise |
64 | | - --> $DIR/get_unwrap.rs:49:9 |
| 68 | + --> $DIR/get_unwrap.rs:50:9 |
65 | 69 | | |
66 | 70 | LL | *some_vecdeque.get_mut(0).unwrap() = 1; |
67 | 71 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]` |
68 | 72 |
|
69 | 73 | error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise |
70 | | - --> $DIR/get_unwrap.rs:58:17 |
| 74 | + --> $DIR/get_unwrap.rs:59:17 |
71 | 75 | | |
72 | 76 | LL | let _ = some_vec.get(0..1).unwrap().to_vec(); |
73 | 77 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]` |
74 | 78 |
|
75 | 79 | error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise |
76 | | - --> $DIR/get_unwrap.rs:59:17 |
| 80 | + --> $DIR/get_unwrap.rs:60:17 |
77 | 81 | | |
78 | 82 | LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec(); |
79 | 83 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]` |
|
0 commit comments