Skip to content

Commit bf7a786

Browse files
DennisOSRMdswij
andcommitted
Apply suggestions from code review
Co-authored-by: dswij <dharmasw@outlook.com>
1 parent 58a605f commit bf7a786

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/needless_parens_on_range_literal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
1414
declare_clippy_lint! {
1515
/// ### What it does
1616
/// The lint checks for parenthesis on literals in range statements that are
17-
/// superflous.
17+
/// superfluous.
1818
///
1919
/// ### Why is this bad?
20-
/// Having superflous parenthesis makes the code less legible as the impose an
20+
/// Having superfluous parenthesis makes the code less readable
2121
/// overhead when reading.
2222
///
2323
/// ### Example
@@ -57,7 +57,7 @@ fn check_for_parens(cx: &LateContext<'_>, e: &Expr<'_>, is_start: bool) {
5757
}
5858
if_chain! {
5959
if let ExprKind::Lit(ref literal) = e.kind;
60-
// the indicator that paranthese surround the literal is that span of the expression and the literal differ
60+
// the indicator that parenthesis surround the literal is that the span of the expression and the literal differ
6161
if (literal.span.data().hi - literal.span.data().lo) != (e.span.data().hi - e.span.data().lo);
6262
// inspect the source code of the expression for parenthesis
6363
if snippet_enclosed_in_parenthesis(&snippet(cx, e.span, ""));

0 commit comments

Comments
 (0)