Skip to content

Commit

Permalink
unpwrap iterators in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-piziak committed Oct 22, 2016
1 parent dba6678 commit cb26d55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/run-fail/iter-step-overflow-debug.rs
Expand Up @@ -15,13 +15,13 @@ use std::panic;
fn main() {
let r = panic::catch_unwind(|| {
let mut it = u8::max_value()..;
it.next();
it.next().unwrap();
});
assert!(r.is_err());

let r = panic::catch_unwind(|| {
let mut it = i8::max_value()..;
it.next();
it.next().unwrap();
});
assert!(r.is_err());
}
4 changes: 2 additions & 2 deletions src/test/run-fail/iter-step-overflow-ndebug.rs
Expand Up @@ -12,8 +12,8 @@

fn main() {
let mut it = u8::max_value()..;
assert_eq!(it.next(), u8::min_value());
assert_eq!(it.next().unwrap(), u8::min_value());

let mut it = i8::max_value()..;
assert_eq!(it.next(), i8::min_value());
assert_eq!(it.next().unwrap(), i8::min_value());
}

0 comments on commit cb26d55

Please sign in to comment.