2020-10-26 01:20:57 +00:00
|
|
|
error: `.map().collect()` can be replaced with `.try_for_each()`
|
|
|
|
--> $DIR/map_collect_result_unit.rs:6:17
|
|
|
|
|
|
|
|
|
LL | let _ = (0..3).map(|t| Err(t + 1)).collect::<Result<(), _>>();
|
2023-07-01 11:08:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(0..3).try_for_each(|t| Err(t + 1))`
|
2020-10-26 01:20:57 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::map-collect-result-unit` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: `.map().collect()` can be replaced with `.try_for_each()`
|
|
|
|
--> $DIR/map_collect_result_unit.rs:7:32
|
|
|
|
|
|
|
|
|
LL | let _: Result<(), _> = (0..3).map(|t| Err(t + 1)).collect();
|
2023-07-01 11:08:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(0..3).try_for_each(|t| Err(t + 1))`
|
2020-10-26 01:20:57 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|