Skip to content

Commit b1e0d15

Browse files
committed
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
2 parents 02399f4 + e1743ef commit b1e0d15

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/map_err_ignore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
77
declare_clippy_lint! {
88
/// **What it does:** Checks for instances of `map_err(|_| Some::Enum)`
99
///
10-
/// **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
10+
/// **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
1111
///
1212
/// **Known problems:** None.
1313
///
@@ -135,7 +135,7 @@ impl<'tcx> LateLintPass<'tcx> for MapErrIgnore {
135135
body_span,
136136
"`map_err(|_|...` wildcard pattern discards the original error",
137137
None,
138-
"Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)",
138+
"consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)",
139139
);
140140
}
141141
}

tests/ui/map_err.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | println!("{:?}", x.map_err(|_| Errors::Ignored));
55
| ^^^
66
|
77
= note: `-D clippy::map-err-ignore` implied by `-D warnings`
8-
= help: Consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
8+
= help: consider storing the original error as a source in the new error, or silence this warning using an ignored identifier (`.map_err(|_foo| ...`)
99

1010
error: aborting due to previous error
1111

0 commit comments

Comments
 (0)