]> git.lizzy.rs Git - rust.git/commitdiff
Fix a style of texts in `map_err_ignore`
authorTakayuki Nakata <f.seasons017@gmail.com>
Thu, 24 Dec 2020 23:59:34 +0000 (08:59 +0900)
committerTakayuki Nakata <f.seasons017@gmail.com>
Thu, 24 Dec 2020 23:59:34 +0000 (08:59 +0900)
clippy_lints/src/map_err_ignore.rs
tests/ui/map_err.stderr

index f3c0515b9bcde0e9e4522a9a517dc03e93fa8d38..76fe8e776eafda01f6d642edb19270a5182ddba2 100644 (file)
@@ -7,7 +7,7 @@
 declare_clippy_lint! {
     /// **What it does:** Checks for instances of `map_err(|_| Some::Enum)`
     ///
-    /// **Why is this bad?** This map_err throws away the original error rather than allowing the enum to contain and report the cause of the error
+    /// **Why is this bad?** This `map_err` throws away the original error rather than allowing the enum to contain and report the cause of the error
     ///
     /// **Known problems:** None.
     ///
@@ -135,7 +135,7 @@ fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) {
                                     body_span,
                                     "`map_err(|_|...` wildcard pattern discards the original error",
                                     None,
-                                    "Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)",
+                                    "consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)",
                                 );
                             }
                         }
index 8ee2941790d3542d243502c8dd81135480830d06..37e87e64de28f1be6c43b29e5ac6f56f2e12afa3 100644 (file)
@@ -5,7 +5,7 @@ LL |     println!("{:?}", x.map_err(|_| Errors::Ignored));
    |                                ^^^
    |
    = note: `-D clippy::map-err-ignore` implied by `-D warnings`
-   = help: Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
+   = help: consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
 
 error: aborting due to previous error