Auto merge of #6505 - giraffate:fix_style_of_texts_in_map_err_ignore, r=phansch

Fix a style of texts in `map_err_ignore`

It's a small fix of texts.

changelog: none
This commit is contained in:
bors 2020-12-25 15:47:31 +00:00
commit b1e0d15d58
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
declare_clippy_lint! { declare_clippy_lint! {
/// **What it does:** Checks for instances of `map_err(|_| Some::Enum)` /// **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. /// **Known problems:** None.
/// ///
@ -135,7 +135,7 @@ fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) {
body_span, body_span,
"`map_err(|_|...` wildcard pattern discards the original error", "`map_err(|_|...` wildcard pattern discards the original error",
None, 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| ...`)",
); );
} }
} }

View File

@ -5,7 +5,7 @@ LL | println!("{:?}", x.map_err(|_| Errors::Ignored));
| ^^^ | ^^^
| |
= note: `-D clippy::map-err-ignore` implied by `-D warnings` = 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 error: aborting due to previous error