diff options
| author | Dennis Luxen <ich@dennisluxen.de> | 2022-06-05 21:41:00 +0200 |
|---|---|---|
| committer | Dennis Luxen <info@project-osrm.org> | 2022-06-05 22:47:15 +0200 |
| commit | bf7a7864815f0e42ab020f768aaf8c671895d727 (patch) | |
| tree | 4c54ff443858a494b1ef4a31bf3ee1d7e4c6c651 | |
| parent | 58a605f45301717219242c9bbd38764072092d01 (diff) | |
| download | rust-bf7a7864815f0e42ab020f768aaf8c671895d727.tar.gz rust-bf7a7864815f0e42ab020f768aaf8c671895d727.zip | |
Apply suggestions from code review
Co-authored-by: dswij <dharmasw@outlook.com>
| -rw-r--r-- | clippy_lints/src/needless_parens_on_range_literal.rs | 6 |
1 files 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 89cb015b7d4..b9f618d5f56 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, "")); |
