Fix warning in core::time
tests
This commit is contained in:
parent
3ddd67ba53
commit
10ab98da8c
@ -77,14 +77,16 @@ fn checked_sub() {
|
|||||||
assert_eq!(zero.checked_sub(one_sec), None);
|
assert_eq!(zero.checked_sub(one_sec), None);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test] #[should_panic]
|
#[test]
|
||||||
|
#[should_panic]
|
||||||
fn sub_bad1() {
|
fn sub_bad1() {
|
||||||
Duration::new(0, 0) - Duration::new(0, 1);
|
let _ = Duration::new(0, 0) - Duration::new(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test] #[should_panic]
|
#[test]
|
||||||
|
#[should_panic]
|
||||||
fn sub_bad2() {
|
fn sub_bad2() {
|
||||||
Duration::new(0, 0) - Duration::new(1, 0);
|
let _ = Duration::new(0, 0) - Duration::new(1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user