Skip to content

Commit cb26d55

Browse files
unpwrap iterators in tests
1 parent dba6678 commit cb26d55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/run-fail/iter-step-overflow-debug.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use std::panic;
1515
fn main() {
1616
let r = panic::catch_unwind(|| {
1717
let mut it = u8::max_value()..;
18-
it.next();
18+
it.next().unwrap();
1919
});
2020
assert!(r.is_err());
2121

2222
let r = panic::catch_unwind(|| {
2323
let mut it = i8::max_value()..;
24-
it.next();
24+
it.next().unwrap();
2525
});
2626
assert!(r.is_err());
2727
}

src/test/run-fail/iter-step-overflow-ndebug.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
fn main() {
1414
let mut it = u8::max_value()..;
15-
assert_eq!(it.next(), u8::min_value());
15+
assert_eq!(it.next().unwrap(), u8::min_value());
1616

1717
let mut it = i8::max_value()..;
18-
assert_eq!(it.next(), i8::min_value());
18+
assert_eq!(it.next().unwrap(), i8::min_value());
1919
}

0 commit comments

Comments
 (0)