File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,9 @@ declare_clippy_lint! {
15
15
/// just to compare to zero, and suggests using `.is_empty()` where applicable.
16
16
///
17
17
/// **Why is this bad?** Some structures can answer `.is_empty()` much faster
18
- /// than calculating their length. Notably, for slices, getting the length
19
- /// requires a subtraction whereas `.is_empty()` is just a comparison. So it is
20
- /// good to get into the habit of using `.is_empty()`, and having it is cheap.
21
- /// Besides, it makes the intent clearer than a manual comparison.
18
+ /// than calculating their length. So it is good to get into the habit of using
19
+ /// `.is_empty()`, and having it is cheap.
20
+ /// Besides, it makes the intent clearer than a manual comparison in some contexts.
22
21
///
23
22
/// **Known problems:** None.
24
23
///
You can’t perform that action at this time.
0 commit comments