We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2efabf9 commit 6ac06a8Copy full SHA for 6ac06a8
tests/adaptors_no_collect.rs
@@ -11,12 +11,11 @@ impl Iterator for PanickingCounter {
11
fn next(&mut self) -> Option<Self::Item> {
12
self.curr += 1;
13
14
- if self.curr == self.max {
15
- panic!(
16
- "Input iterator reached maximum of {} suggesting collection by adaptor",
17
- self.max
18
- );
19
- }
+ assert_ne!(
+ self.curr, self.max,
+ "Input iterator reached maximum of {} suggesting collection by adaptor",
+ self.max
+ );
20
21
Some(())
22
}
0 commit comments