Skip to content

Commit 2d467dc

Browse files
author
chansuke
committed
Add required negation in non_zero lint
1 parent dc69a5c commit 2d467dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/len_zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ fn check_len(
244244
LEN_ZERO,
245245
span,
246246
&format!("length comparison to {}", if compare_to == 0 { "zero" } else { "one" }),
247-
"using `is_empty` is clearer and more explicit",
247+
&format!("using `{}is_empty` is clearer and more explicit", op),
248248
format!(
249249
"{}{}.is_empty()",
250250
op,

0 commit comments

Comments
 (0)