| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:20:22 |
| | |
| LL | v.clone().iter().filter_map(|i| (i % 2 == 0).then(|| i + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i % 2 == 0)).map(|i| i + 1)` |
| | |
| = note: `-D clippy::filter-map-bool-then` implied by `-D warnings` |
| |
| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:21:27 |
| | |
| LL | v.clone().into_iter().filter_map(|i| (i % 2 == 0).then(|| i + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i % 2 == 0)).map(|i| i + 1)` |
| |
| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:24:10 |
| | |
| LL | .filter_map(|i| -> Option<_> { (i % 2 == 0).then(|| i + 1) }); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i % 2 == 0)).map(|i| i + 1)` |
| |
| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:28:10 |
| | |
| LL | .filter_map(|i| (i % 2 == 0).then(|| i + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i % 2 == 0)).map(|i| i + 1)` |
| |
| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:32:10 |
| | |
| LL | .filter_map(|i| (i.clone() % 2 == 0).then(|| i + 1)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i.clone() % 2 == 0)).map(|i| i + 1)` |
| |
| error: usage of `bool::then` in `filter_map` |
| --> $DIR/filter_map_bool_then.rs:38:22 |
| | |
| LL | v.clone().iter().filter_map(|i| (i == &NonCopy).then(|| i)); |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&i| (i == &NonCopy)).map(|i| i)` |
| |
| error: aborting due to 6 previous errors |
| |