Skip to content

Commit

Permalink
Reformat code.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongmao86 committed Jan 29, 2020
1 parent 26b1d60 commit ac9f019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ fn lint_unwrap(cx: &LateContext<'_, '_>, expr: &hir::Expr<'_>, unwrap_args: &[hi
&format!("used `unwrap()` on `{}` value", kind,),
&format!(
"if you don't want to handle the `{}` case gracefully, consider \
using `expect()` to provide a better panic message",
using `expect()` to provide a better panic message",
none_value,
),
);
Expand Down Expand Up @@ -2679,7 +2679,7 @@ fn lint_filter_flat_map<'a, 'tcx>(
if match_trait_method(cx, expr, &paths::ITERATOR) {
let msg = "called `filter(p).flat_map(q)` on an `Iterator`";
let hint = "this is more succinctly expressed by calling `.flat_map(..)` \
and filtering by returning `iter::empty()`";
and filtering by returning `iter::empty()`";
span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
}
}
Expand All @@ -2695,7 +2695,7 @@ fn lint_filter_map_flat_map<'a, 'tcx>(
if match_trait_method(cx, expr, &paths::ITERATOR) {
let msg = "called `filter_map(p).flat_map(q)` on an `Iterator`";
let hint = "this is more succinctly expressed by calling `.flat_map(..)` \
and filtering by returning `iter::empty()`";
and filtering by returning `iter::empty()`";
span_lint_and_help(cx, FILTER_MAP, expr.span, msg, hint);
}
}
Expand Down Expand Up @@ -3148,7 +3148,7 @@ fn lint_option_as_ref_deref<'a, 'tcx>(

let msg = format!(
"called `{0}` (or with one of deref aliases) on an Option value. \
This can be done more directly by calling `{1}` instead",
This can be done more directly by calling `{1}` instead",
current_method, hint
);
span_lint_and_sugg(
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl Types {
OPTION_OPTION,
hir_ty.span,
"consider using `Option<T>` instead of `Option<Option<T>>` or a custom \
enum if you need to distinguish all 3 cases",
enum if you need to distinguish all 3 cases",
);
return; // don't recurse into the type
}
Expand Down

0 comments on commit ac9f019

Please sign in to comment.