From bf7a7864815f0e42ab020f768aaf8c671895d727 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Sun, 5 Jun 2022 21:41:00 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: dswij --- clippy_lints/src/needless_parens_on_range_literal.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/needless_parens_on_range_literal.rs b/clippy_lints/src/needless_parens_on_range_literal.rs index 89cb015b7..b9f618d5f 100644 --- a/clippy_lints/src/needless_parens_on_range_literal.rs +++ b/clippy_lints/src/needless_parens_on_range_literal.rs @@ -14,10 +14,10 @@ use rustc_session::{declare_lint_pass, declare_tool_lint}; declare_clippy_lint! { /// ### What it does /// The lint checks for parenthesis on literals in range statements that are - /// superflous. + /// superfluous. /// /// ### Why is this bad? - /// Having superflous parenthesis makes the code less legible as the impose an + /// Having superfluous parenthesis makes the code less readable /// overhead when reading. /// /// ### Example @@ -57,7 +57,7 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) { } if_chain! { if let ExprKind::Lit(ref literal) = e.kind; - // the indicator that paranthese surround the literal is that span of the expression and the literal differ + // the indicator that parenthesis surround the literal is that the span of the expression and the literal differ if (literal.span.data().hi - literal.span.data().lo) != (e.span.data().hi - e.span.data().lo); // inspect the source code of the expression for parenthesis if snippet_enclosed_in_parenthesis(&snippet(cx, e.span, ""));