aboutsummaryrefslogtreecommitdiff
path: root/tests/adaptors_no_collect.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/adaptors_no_collect.rs')
-rw-r--r--tests/adaptors_no_collect.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/adaptors_no_collect.rs b/tests/adaptors_no_collect.rs
index a47f906..103db23 100644
--- a/tests/adaptors_no_collect.rs
+++ b/tests/adaptors_no_collect.rs
@@ -11,12 +11,11 @@ impl Iterator for PanickingCounter {
fn next(&mut self) -> Option<Self::Item> {
self.curr += 1;
- if self.curr == self.max {
- panic!(
- "Input iterator reached maximum of {} suggesting collection by adaptor",
- self.max
- );
- }
+ assert_ne!(
+ self.curr, self.max,
+ "Input iterator reached maximum of {} suggesting collection by adaptor",
+ self.max
+ );
Some(())
}