Skip to content

Commit

Permalink
Fixed typo in lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricky authored and Ricky committed Sep 8, 2020
1 parent c31d473 commit 4f1c4a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/map_err_ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
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 bubble the original 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.
///
Expand Down Expand Up @@ -133,7 +133,7 @@ impl<'tcx> LateLintPass<'tcx> for MapErrIgnore {
cx,
MAP_ERR_IGNORE,
body_span,
"`map_else(|_|...` ignores the original error",
"`map_err(|_|...` ignores the original error",
None,
"Consider wrapping the error in an enum variant",
);
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/map_err.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: `map_else(|_|...` ignores the original error
error: `map_err(|_|...` ignores the original error
--> $DIR/map_err.rs:21:32
|
LL | println!("{:?}", x.map_err(|_| Errors::Ignored));
Expand Down

0 comments on commit 4f1c4a9

Please sign in to comment.