@@ -32,5 +32,45 @@ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
3232LL | let _ = vec.iter().filter(|f| f.field.is_ok()).map(|f| f.field.clone().unwrap());
3333 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `filter_map(|f| f.field.clone().ok())`
3434
35- error: aborting due to 5 previous errors
35+ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
36+ --> $DIR/manual_filter_map.rs:63:10
37+ |
38+ LL | .filter(|f| f.field.is_ok())
39+ | __________^
40+ LL | | .map(|f| f.field.as_ref().unwrap());
41+ | |___________________________________________^ help: try: `filter_map(|f| f.field.as_ref().ok())`
42+
43+ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
44+ --> $DIR/manual_filter_map.rs:68:10
45+ |
46+ LL | .filter(|f| f.field.is_ok())
47+ | __________^
48+ LL | | .map(|f| f.field.as_deref().unwrap());
49+ | |_____________________________________________^ help: try: `filter_map(|f| f.field.as_deref().ok())`
50+
51+ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
52+ --> $DIR/manual_filter_map.rs:73:10
53+ |
54+ LL | .filter(|f| f.field.is_ok())
55+ | __________^
56+ LL | | .map(|f| f.field.as_mut().unwrap());
57+ | |___________________________________________^ help: try: `filter_map(|f| f.field.as_mut().ok())`
58+
59+ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
60+ --> $DIR/manual_filter_map.rs:78:10
61+ |
62+ LL | .filter(|f| f.field.is_ok())
63+ | __________^
64+ LL | | .map(|f| f.field.as_deref_mut().unwrap());
65+ | |_________________________________________________^ help: try: `filter_map(|f| f.field.as_deref_mut().ok())`
66+
67+ error: `filter(..).map(..)` can be simplified as `filter_map(..)`
68+ --> $DIR/manual_filter_map.rs:83:10
69+ |
70+ LL | .filter(|f| f.field.is_ok())
71+ | __________^
72+ LL | | .map(|f| f.field.to_owned().unwrap());
73+ | |_____________________________________________^ help: try: `filter_map(|f| f.field.to_owned().ok())`
74+
75+ error: aborting due to 10 previous errors
3676
0 commit comments