|
| 1 | +error: redundant closure found |
| 2 | + --> $DIR/filter_methods.rs:19:14 |
| 3 | + | |
| 4 | +LL | .map(|x| x.unwrap()) |
| 5 | + | ^^^^^^^^^^^^^^ help: remove closure as shown: `std::option::Option::unwrap` |
| 6 | + | |
| 7 | + = note: `-D clippy::redundant-closure-for-method-calls` implied by `-D warnings` |
| 8 | + |
| 9 | +error: called `filter(p).map(q)` on an `Iterator<Option<_>>`. Consider calling `.filter_map(..)` instead. |
| 10 | + --> $DIR/filter_methods.rs:18:10 |
| 11 | + | |
| 12 | +LL | .filter(|x| x.is_some()) |
| 13 | + | __________^ |
| 14 | +LL | | .map(|x| x.unwrap()) |
| 15 | + | |____________________________^ |
| 16 | + | |
| 17 | + = note: `-D clippy::filter-map` implied by `-D warnings` |
| 18 | + |
| 19 | +error: redundant closure found |
| 20 | + --> $DIR/filter_methods.rs:18:17 |
| 21 | + | |
| 22 | +LL | .filter(|x| x.is_some()) |
| 23 | + | ^^^^^^^^^^^^^^^ help: remove closure as shown: `std::option::Option::is_some` |
| 24 | + |
| 25 | +error: redundant closure found |
| 26 | + --> $DIR/filter_methods.rs:27:19 |
| 27 | + | |
| 28 | +LL | .flat_map(|x| x.unwrap()) |
| 29 | + | ^^^^^^^^^^^^^^ help: remove closure as shown: `std::option::Option::unwrap` |
| 30 | + |
| 31 | +error: redundant closure found |
| 32 | + --> $DIR/filter_methods.rs:26:17 |
| 33 | + | |
| 34 | +LL | .filter(|x| x.is_some()) |
| 35 | + | ^^^^^^^^^^^^^^^ help: remove closure as shown: `std::option::Option::is_some` |
| 36 | + |
| 37 | +error: redundant closure found |
| 38 | + --> $DIR/filter_methods.rs:34:14 |
| 39 | + | |
| 40 | +LL | .map(|s| s.unwrap()) |
| 41 | + | ^^^^^^^^^^^^^^ help: remove closure as shown: `std::result::Result::unwrap` |
| 42 | + |
| 43 | +error: called `filter(p).map(q)` on an `Iterator<Result<_>>`. Consider calling `.filter_map(..)` instead. |
| 44 | + --> $DIR/filter_methods.rs:33:10 |
| 45 | + | |
| 46 | +LL | .filter(|s| s.is_ok()) |
| 47 | + | __________^ |
| 48 | +LL | | .map(|s| s.unwrap()) |
| 49 | + | |____________________________^ |
| 50 | + |
| 51 | +error: redundant closure found |
| 52 | + --> $DIR/filter_methods.rs:33:17 |
| 53 | + | |
| 54 | +LL | .filter(|s| s.is_ok()) |
| 55 | + | ^^^^^^^^^^^^^ help: remove closure as shown: `std::result::Result::is_ok` |
| 56 | + |
| 57 | +error: aborting due to 8 previous errors |
| 58 | + |
0 commit comments