Skip to content

Commit 11ba624

Browse files
committed
Auto merge of #3653 - gendx:master, r=phansch
Fix typos in clippy_lints/src/len_zero.rs Some comments in the len_zero lint had typos.
2 parents ec1a6cb + 798a419 commit 11ba624

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/len_zero.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ use syntax::source_map::{Span, Spanned};
3131
/// ```
3232
/// instead use
3333
/// ```rust
34-
/// if x.len().is_empty() {
34+
/// if x.is_empty() {
3535
/// ..
3636
/// }
37-
/// if !y.len().is_empty() {
37+
/// if !y.is_empty() {
3838
/// ..
3939
/// }
4040
/// ```
@@ -115,8 +115,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero {
115115
check_cmp(cx, expr.span, left, right, "", 1); // len < 1
116116
check_cmp(cx, expr.span, right, left, "!", 0); // 0 < len
117117
},
118-
BinOpKind::Ge => check_cmp(cx, expr.span, left, right, "!", 1), // len <= 1
119-
BinOpKind::Le => check_cmp(cx, expr.span, right, left, "!", 1), // 1 >= len
118+
BinOpKind::Ge => check_cmp(cx, expr.span, left, right, "!", 1), // len >= 1
119+
BinOpKind::Le => check_cmp(cx, expr.span, right, left, "!", 1), // 1 <= len
120120
_ => (),
121121
}
122122
}

0 commit comments

Comments
 (0)