From 98a244fc2726e264310bc9eb1df080a0c3658ac6 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Sun, 19 Apr 2020 20:40:25 +0200 Subject: [PATCH] Formatting and naming --- clippy_lints/src/loops.rs | 4 ++-- clippy_lints/src/utils/internal_lints.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index cd65b337980..b03ff60385c 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -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!( diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index ed90905ce32..6eb6c2d98e9 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -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", ); } }