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.
///
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| ...`)",
);
}
}
| ^^^
|
= 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