mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
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.
This commit is contained in:
@@ -31,10 +31,10 @@
|
||||
/// ```
|
||||
/// instead use
|
||||
/// ```rust
|
||||
/// if x.len().is_empty() {
|
||||
/// if x.is_empty() {
|
||||
/// ..
|
||||
/// }
|
||||
/// if !y.len().is_empty() {
|
||||
/// if !y.is_empty() {
|
||||
/// ..
|
||||
/// }
|
||||
/// ```
|
||||
@@ -115,8 +115,8 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
||||
check_cmp(cx, expr.span, left, right, "", 1); // len < 1
|
||||
check_cmp(cx, expr.span, right, left, "!", 0); // 0 < len
|
||||
},
|
||||
BinOpKind::Ge => check_cmp(cx, expr.span, left, right, "!", 1), // len <= 1
|
||||
BinOpKind::Le => check_cmp(cx, expr.span, right, left, "!", 1), // 1 >= len
|
||||
BinOpKind::Ge => check_cmp(cx, expr.span, left, right, "!", 1), // len >= 1
|
||||
BinOpKind::Le => check_cmp(cx, expr.span, right, left, "!", 1), // 1 <= len
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user