Skip to content

Commit 6ac06a8

Browse files
hellow554phimuemue
authored andcommitted
fix clippy::manual_assert in tests
1 parent 2efabf9 commit 6ac06a8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/adaptors_no_collect.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ impl Iterator for PanickingCounter {
1111
fn next(&mut self) -> Option<Self::Item> {
1212
self.curr += 1;
1313

14-
if self.curr == self.max {
15-
panic!(
16-
"Input iterator reached maximum of {} suggesting collection by adaptor",
17-
self.max
18-
);
19-
}
14+
assert_ne!(
15+
self.curr, self.max,
16+
"Input iterator reached maximum of {} suggesting collection by adaptor",
17+
self.max
18+
);
2019

2120
Some(())
2221
}

0 commit comments

Comments
 (0)