unpwrap iterators in tests
This commit is contained in:
parent
dba66788bd
commit
cb26d5503e
2 changed files with 4 additions and 4 deletions
|
@ -15,13 +15,13 @@ use std::panic;
|
||||||
fn main() {
|
fn main() {
|
||||||
let r = panic::catch_unwind(|| {
|
let r = panic::catch_unwind(|| {
|
||||||
let mut it = u8::max_value()..;
|
let mut it = u8::max_value()..;
|
||||||
it.next();
|
it.next().unwrap();
|
||||||
});
|
});
|
||||||
assert!(r.is_err());
|
assert!(r.is_err());
|
||||||
|
|
||||||
let r = panic::catch_unwind(|| {
|
let r = panic::catch_unwind(|| {
|
||||||
let mut it = i8::max_value()..;
|
let mut it = i8::max_value()..;
|
||||||
it.next();
|
it.next().unwrap();
|
||||||
});
|
});
|
||||||
assert!(r.is_err());
|
assert!(r.is_err());
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut it = u8::max_value()..;
|
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()..;
|
let mut it = i8::max_value()..;
|
||||||
assert_eq!(it.next(), i8::min_value());
|
assert_eq!(it.next().unwrap(), i8::min_value());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue