Formatting and naming
This commit is contained in:
parent
41115d994a
commit
98a244fc27
2 changed files with 3 additions and 3 deletions
|
@ -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!(
|
||||
|
|
|
@ -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",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue