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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,
span,
NEEDLESS_COLLECT_MSG,
|db| {
|diag| {
let (arg, pred) = if contains_arg.starts_with('&') {
("x", &contains_arg[1..])
} else {
("&x", &*contains_arg)
};
db.span_suggestion(
diag.span_suggestion(
span,
"replace with",
format!(

View file

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