mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
19 lines
690 B
Text
19 lines
690 B
Text
error: this call to `map()` won't have an effect on the call to `count()`
|
|
--> $DIR/suspicious_map.rs:4:13
|
|
|
|
|
LL | let _ = (0..3).map(|x| x + 2).count();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
|
|
= note: `-D clippy::suspicious-map` implied by `-D warnings`
|
|
|
|
error: this call to `map()` won't have an effect on the call to `count()`
|
|
--> $DIR/suspicious_map.rs:7:13
|
|
|
|
|
LL | let _ = (0..3).map(f).count();
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|