]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/find_map.stderr
iterate List by value
[rust.git] / tests / ui / find_map.stderr
index 0417c7f3dc9a03721920bc756ee45bedae65c567..92f40fe6f1fb23b8a6e2b6681019c573ef5c2e2a 100644 (file)
@@ -1,12 +1,13 @@
-error: called `find(p).map(q)` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead.
+error: called `find(p).map(q)` on an `Iterator`
   --> $DIR/find_map.rs:20:26
    |
 LL |     let _: Option<i32> = a.iter().find(|s| s.parse::<i32>().is_ok()).map(|s| s.parse().unwrap());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D clippy::find-map` implied by `-D warnings`
+   = help: this is more succinctly expressed by calling `.find_map(..)` instead
 
-error: called `find(p).map(q)` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead.
+error: called `find(p).map(q)` on an `Iterator`
   --> $DIR/find_map.rs:22:29
    |
 LL |       let _: Option<Flavor> = desserts_of_the_week
@@ -18,6 +19,8 @@ LL | |             Dessert::Cake(_) => true,
 LL | |             _ => unreachable!(),
 LL | |         });
    | |__________^
+   |
+   = help: this is more succinctly expressed by calling `.find_map(..)` instead
 
 error: aborting due to 2 previous errors