1 error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
2 --> $DIR/get_unwrap.rs:35:17
4 LL | let _ = boxed_slice.get(1).unwrap();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]`
7 note: the lint level is defined here
8 --> $DIR/get_unwrap.rs:5:9
10 LL | #![deny(clippy::get_unwrap)]
13 error: used `unwrap()` on an `Option` value
14 --> $DIR/get_unwrap.rs:35:17
16 LL | let _ = boxed_slice.get(1).unwrap();
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
20 = note: `-D clippy::unwrap-used` implied by `-D warnings`
22 error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
23 --> $DIR/get_unwrap.rs:36:17
25 LL | let _ = some_slice.get(0).unwrap();
26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_slice[0]`
28 error: used `unwrap()` on an `Option` value
29 --> $DIR/get_unwrap.rs:36:17
31 LL | let _ = some_slice.get(0).unwrap();
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
34 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
36 error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
37 --> $DIR/get_unwrap.rs:37:17
39 LL | let _ = some_vec.get(0).unwrap();
40 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vec[0]`
42 error: used `unwrap()` on an `Option` value
43 --> $DIR/get_unwrap.rs:37:17
45 LL | let _ = some_vec.get(0).unwrap();
46 | ^^^^^^^^^^^^^^^^^^^^^^^^
48 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
50 error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
51 --> $DIR/get_unwrap.rs:38:17
53 LL | let _ = some_vecdeque.get(0).unwrap();
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_vecdeque[0]`
56 error: used `unwrap()` on an `Option` value
57 --> $DIR/get_unwrap.rs:38:17
59 LL | let _ = some_vecdeque.get(0).unwrap();
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
64 error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
65 --> $DIR/get_unwrap.rs:39:17
67 LL | let _ = some_hashmap.get(&1).unwrap();
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_hashmap[&1]`
70 error: used `unwrap()` on an `Option` value
71 --> $DIR/get_unwrap.rs:39:17
73 LL | let _ = some_hashmap.get(&1).unwrap();
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
78 error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
79 --> $DIR/get_unwrap.rs:40:17
81 LL | let _ = some_btreemap.get(&1).unwrap();
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&some_btreemap[&1]`
84 error: used `unwrap()` on an `Option` value
85 --> $DIR/get_unwrap.rs:40:17
87 LL | let _ = some_btreemap.get(&1).unwrap();
88 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
92 error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
93 --> $DIR/get_unwrap.rs:44:21
95 LL | let _: u8 = *boxed_slice.get(1).unwrap();
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[1]`
98 error: used `unwrap()` on an `Option` value
99 --> $DIR/get_unwrap.rs:44:22
101 LL | let _: u8 = *boxed_slice.get(1).unwrap();
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
106 error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
107 --> $DIR/get_unwrap.rs:49:9
109 LL | *boxed_slice.get_mut(0).unwrap() = 1;
110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `boxed_slice[0]`
112 error: used `unwrap()` on an `Option` value
113 --> $DIR/get_unwrap.rs:49:10
115 LL | *boxed_slice.get_mut(0).unwrap() = 1;
116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
120 error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
121 --> $DIR/get_unwrap.rs:50:9
123 LL | *some_slice.get_mut(0).unwrap() = 1;
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_slice[0]`
126 error: used `unwrap()` on an `Option` value
127 --> $DIR/get_unwrap.rs:50:10
129 LL | *some_slice.get_mut(0).unwrap() = 1;
130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
134 error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
135 --> $DIR/get_unwrap.rs:51:9
137 LL | *some_vec.get_mut(0).unwrap() = 1;
138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0]`
140 error: used `unwrap()` on an `Option` value
141 --> $DIR/get_unwrap.rs:51:10
143 LL | *some_vec.get_mut(0).unwrap() = 1;
144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
148 error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
149 --> $DIR/get_unwrap.rs:52:9
151 LL | *some_vecdeque.get_mut(0).unwrap() = 1;
152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vecdeque[0]`
154 error: used `unwrap()` on an `Option` value
155 --> $DIR/get_unwrap.rs:52:10
157 LL | *some_vecdeque.get_mut(0).unwrap() = 1;
158 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
162 error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
163 --> $DIR/get_unwrap.rs:64:17
165 LL | let _ = some_vec.get(0..1).unwrap().to_vec();
166 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
168 error: used `unwrap()` on an `Option` value
169 --> $DIR/get_unwrap.rs:64:17
171 LL | let _ = some_vec.get(0..1).unwrap().to_vec();
172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
174 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
176 error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
177 --> $DIR/get_unwrap.rs:65:17
179 LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
180 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `some_vec[0..1]`
182 error: used `unwrap()` on an `Option` value
183 --> $DIR/get_unwrap.rs:65:17
185 LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
186 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188 = help: if you don't want to handle the `None` case gracefully, consider using `expect()` to provide a better panic message
190 error: aborting due to 26 previous errors