Skip to content

Commit f94596f

Browse files
committed
fix clippy::comparison_to_empty in tests
1 parent 2fcef68 commit f94596f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ fn tree_fold1() {
11431143
"0 1 x 2 3 x x 4 5 x 6 7 x x x 8 9 x 10 11 x x 12 13 x 14 15 x x x x",
11441144
];
11451145
for (i, &s) in x.iter().enumerate() {
1146-
let expected = if s == "" { None } else { Some(s.to_string()) };
1146+
let expected = if s.is_empty() { None } else { Some(s.to_string()) };
11471147
let num_strings = (0..i).map(|x| x.to_string());
11481148
let actual = num_strings.tree_fold1(|a, b| format!("{} {} x", a, b));
11491149
assert_eq!(actual, expected);

0 commit comments

Comments
 (0)