Skip to content

Commit

Permalink
Obey the dictums of rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
waynr committed Nov 28, 2018
1 parent 6c197cb commit eda304a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ declare_clippy_lint! {
///
/// println!("{:?}", correct);
/// assert_eq!(correct, more_correct);
///
declare_clippy_lint! {
pub FILTER_MAP_MAP,
pedantic,
Expand All @@ -337,7 +336,6 @@ declare_clippy_lint! {
///
/// println!("{:?}", more_correct);
/// assert_eq!(correct, more_correct);
///
declare_clippy_lint! {
pub FILTER_MAP,
pedantic,
Expand Down Expand Up @@ -1954,12 +1952,12 @@ fn lint_filter_map<'a, 'tcx>(
responses.insert(
"is_some".to_string(),
"called `filter(p).map(q)` on an `Iterator<Option<_>>`. \
Consider calling `.filter_map(..)` instead."
Consider calling `.filter_map(..)` instead.",
);
responses.insert(
"is_ok".to_string(),
"called `filter(p).map(q)` on an `Iterator<Result<_>>`. \
Consider calling `.filter_map(..)` instead."
Consider calling `.filter_map(..)` instead.",
);

if_chain! {
Expand Down Expand Up @@ -1996,7 +1994,7 @@ fn lint_filter_map_map<'a, 'tcx>(
// lint if caller of `.filter_map().map()` is an Iterator
if match_trait_method(cx, expr, &paths::ITERATOR) {
let msg = "called `filter_map(p).map(q)` on an `Iterator`. \
This is more succinctly expressed by only calling `.filter_map(..)` instead.";
This is more succinctly expressed by only calling `.filter_map(..)` instead.";
span_lint(cx, FILTER_MAP_MAP, span, msg);
}
}
Expand Down

0 comments on commit eda304a

Please sign in to comment.