Skip to content

Commit

Permalink
Fix warning in core::time tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasKalbertodt authored and kennytm committed May 5, 2018
1 parent 3ddd67b commit 10ab98d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/libcore/tests/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ fn checked_sub() {
assert_eq!(zero.checked_sub(one_sec), None);
}

#[test] #[should_panic]
#[test]
#[should_panic]
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() {
Duration::new(0, 0) - Duration::new(1, 0);
let _ = Duration::new(0, 0) - Duration::new(1, 0);
}

#[test]
Expand Down

0 comments on commit 10ab98d

Please sign in to comment.