Formatting and naming

This commit is contained in:
Philipp Krones
2020-04-19 20:40:25 +02:00
committed by GitHub
parent 41115d994a
commit 98a244fc27
2 changed files with 3 additions and 3 deletions

View File

@@ -2503,13 +2503,13 @@ fn check_needless_collect<'a, 'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'a, '
NEEDLESS_COLLECT, NEEDLESS_COLLECT,
span, span,
NEEDLESS_COLLECT_MSG, NEEDLESS_COLLECT_MSG,
|db| { |diag| {
let (arg, pred) = if contains_arg.starts_with('&') { let (arg, pred) = if contains_arg.starts_with('&') {
("x", &contains_arg[1..]) ("x", &contains_arg[1..])
} else { } else {
("&x", &*contains_arg) ("&x", &*contains_arg)
}; };
db.span_suggestion( diag.span_suggestion(
span, span,
"replace with", "replace with",
format!( format!(

View File

@@ -229,7 +229,7 @@ impl EarlyLintPass for ClippyLintsInternal {
CLIPPY_LINTS_INTERNAL, CLIPPY_LINTS_INTERNAL,
item.span, item.span,
"this constant should be before the previous constant due to lexical \ "this constant should be before the previous constant due to lexical \
ordering", ordering",
); );
} }
} }