Skip to content

Commit

Permalink
Update clippy_lints/src/redundant_slicing.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Krones <[email protected]>
  • Loading branch information
Jarcho and flip1995 committed Jan 15, 2021
1 parent bf028b3 commit 9146a77
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions clippy_lints/src/redundant_slicing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
}
}
Expand Down

0 comments on commit 9146a77

Please sign in to comment.