]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/option_map_or_none.stderr
iterate List by value
[rust.git] / tests / ui / option_map_or_none.stderr
index eb5c68ed79f326c33f705abf8204f3e20df5c06e..6f707987dbcaafd6ce879830f8c46b492de69428 100644 (file)
@@ -1,12 +1,12 @@
-error: called `map_or(None, f)` on an Option value. This can be done more directly by calling `and_then(f)` instead
+error: called `map_or(None, f)` on an `Option` value. This can be done more directly by calling `and_then(f)` instead
   --> $DIR/option_map_or_none.rs:10:13
    |
 LL |     let _ = opt.map_or(None, |x| Some(x + 1));
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using and_then instead: `opt.and_then(|x| Some(x + 1))`
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try using `and_then` instead: `opt.and_then(|x| Some(x + 1))`
    |
    = note: `-D clippy::option-map-or-none` implied by `-D warnings`
 
-error: called `map_or(None, f)` on an Option value. This can be done more directly by calling `and_then(f)` instead
+error: called `map_or(None, f)` on an `Option` value. This can be done more directly by calling `and_then(f)` instead
   --> $DIR/option_map_or_none.rs:13:13
    |
 LL |       let _ = opt.map_or(None, |x| {
@@ -14,7 +14,8 @@ LL |       let _ = opt.map_or(None, |x| {
 LL | |                         Some(x + 1)
 LL | |                        });
    | |_________________________^
-help: try using and_then instead
+   |
+help: try using `and_then` instead
    |
 LL |     let _ = opt.and_then(|x| {
 LL |                         Some(x + 1)