From 798a419b1c57a388fab026263d3bd256bdb779f6 Mon Sep 17 00:00:00 2001 From: Guillaume Endignoux Date: Thu, 10 Jan 2019 22:48:40 +0100 Subject: [PATCH] Fix comments in clippy_lints/src/len_zero.rs --- clippy_lints/src/len_zero.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index 40fef2df27f..b15ba5a4783 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -31,10 +31,10 @@ use syntax::source_map::{Span, Spanned}; /// ``` /// 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 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LenZero { 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 _ => (), } }