From be09693b2a65de1140b18ba8bd5761737b641275 Mon Sep 17 00:00:00 2001 From: Jason Newcomb Date: Thu, 14 Jan 2021 21:38:57 +0000 Subject: [PATCH] Update clippy_lints/src/redundant_slicing.rs Co-authored-by: Philipp Krones --- clippy_lints/src/redundant_slicing.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/redundant_slicing.rs b/clippy_lints/src/redundant_slicing.rs index 4478f5592662..e5ced13514f7 100644 --- a/clippy_lints/src/redundant_slicing.rs +++ b/clippy_lints/src/redundant_slicing.rs @@ -52,8 +52,15 @@ impl LateLintPass<'_> for RedundantSlicing { let mut app = Applicability::MachineApplicable; let hint = snippet_with_applicability(cx, indexed.span, "..", &mut app).into_owned(); - span_lint_and_sugg(cx, REDUNDANT_SLICING, expr.span, "redundant slicing of the whole range", - "use the original slice instead", hint, app); + span_lint_and_sugg( + cx, + REDUNDANT_SLICING, + expr.span, + "redundant slicing of the whole range", + "use the original slice instead", + hint, + app, + ); } } }