Skip to content

Commit 7ca676c

Browse files
Test Itertools::get laziness
As we should, I checked it can't pass without `let _ =`.
1 parent d518cae commit 7ca676c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/laziness.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ must_use_tests! {
6363
intersperse_with {
6464
let _ = Panicking.intersperse_with(|| 0);
6565
}
66+
get {
67+
let _ = Panicking.get(1..4);
68+
let _ = Panicking.get(1..=4);
69+
let _ = Panicking.get(1..);
70+
let _ = Panicking.get(..4);
71+
let _ = Panicking.get(..=4);
72+
let _ = Panicking.get(..);
73+
}
6674
zip_longest {
6775
let _ = Panicking.zip_longest(Panicking);
6876
}

0 commit comments

Comments
 (0)