|
1 | 1 | error: you are creating a collection of `Result`s
|
2 |
| - --> $DIR/collect.rs:6:21 |
3 |
| - | |
4 |
| -6 | let option_vec: Vec<_> = b.iter() |
5 |
| - | ^^^^^^ |
6 |
| - | |
7 |
| - = note: `-D clippy::possible-shortcircuiting-collect` implied by `-D warnings` |
| 2 | + --> $DIR/collect.rs:16:21 |
| 3 | + | |
| 4 | +LL | let option_vec: Vec<_> = b.iter() |
| 5 | + | ^^^^^^ |
| 6 | + | |
| 7 | + = note: `-D clippy::possible-shortcircuiting-collect` implied by `-D warnings` |
8 | 8 | help: if you are only interested in the case where all values are `Ok`, try
|
9 |
| - | |
10 |
| -6 | let option_vec: Result<std::vec::Vec<_>, _> = b.iter() |
11 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 9 | + | |
| 10 | +LL | let option_vec: Result<std::vec::Vec<_>, _> = b.iter() |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
12 | 12 |
|
13 | 13 | error: you are creating a collection of `Option`s
|
14 |
| - --> $DIR/collect.rs:23:18 |
| 14 | + --> $DIR/collect.rs:33:18 |
15 | 15 | |
|
16 |
| -23 | let _result: Vec<_> = a.iter().map(Some).collect(); |
| 16 | +LL | let _result: Vec<_> = a.iter().map(Some).collect(); |
17 | 17 | | ^^^^^^
|
18 | 18 | help: if you are only interested in the case where all values are `Some`, try
|
19 | 19 | |
|
20 |
| -23 | let _result: Option<std::vec::Vec<_>> = a.iter().map(Some).collect(); |
| 20 | +LL | let _result: Option<std::vec::Vec<_>> = a.iter().map(Some).collect(); |
21 | 21 | | ^^^^^^^^^^^^^^^^^^^^^^^^
|
22 | 22 |
|
23 | 23 | error: you are creating a collection of `Option`s
|
24 |
| - --> $DIR/collect.rs:27:34 |
| 24 | + --> $DIR/collect.rs:37:34 |
25 | 25 | |
|
26 |
| -27 | Some(Some(elem)).into_iter().collect() |
| 26 | +LL | Some(Some(elem)).into_iter().collect() |
27 | 27 | | ^^^^^^^^^
|
28 | 28 | help: if you are only interested in the case where all values are `Some`, try
|
29 | 29 | |
|
30 |
| -27 | Some(Some(elem)).into_iter().collect::<Option<C>>() |
| 30 | +LL | Some(Some(elem)).into_iter().collect::<Option<C>>() |
31 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^
|
32 | 32 |
|
33 | 33 | error: aborting due to 3 previous errors
|
|
0 commit comments