From ad936389e1dfa0c526768d76222850158931e054 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Wed, 25 Dec 2019 21:06:55 +0900 Subject: [PATCH] Correct documentation for `len_zero` --- clippy_lints/src/len_zero.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index ea2891f59cc..e403b7af82a 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -15,10 +15,9 @@ declare_clippy_lint! { /// just to compare to zero, and suggests using `.is_empty()` where applicable. /// /// **Why is this bad?** Some structures can answer `.is_empty()` much faster - /// than calculating their length. Notably, for slices, getting the length - /// requires a subtraction whereas `.is_empty()` is just a comparison. So it is - /// good to get into the habit of using `.is_empty()`, and having it is cheap. - /// Besides, it makes the intent clearer than a manual comparison. + /// than calculating their length. So it is good to get into the habit of using + /// `.is_empty()`, and having it is cheap. + /// Besides, it makes the intent clearer than a manual comparison in some contexts. /// /// **Known problems:** None. ///