Skip to content

Commit 10ab98d

Browse files
LukasKalbertodtkennytm
authored andcommitted
Fix warning in core::time tests
1 parent 3ddd67b commit 10ab98d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/libcore/tests/time.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,16 @@ fn checked_sub() {
7777
assert_eq!(zero.checked_sub(one_sec), None);
7878
}
7979

80-
#[test] #[should_panic]
80+
#[test]
81+
#[should_panic]
8182
fn sub_bad1() {
82-
Duration::new(0, 0) - Duration::new(0, 1);
83+
let _ = Duration::new(0, 0) - Duration::new(0, 1);
8384
}
8485

85-
#[test] #[should_panic]
86+
#[test]
87+
#[should_panic]
8688
fn sub_bad2() {
87-
Duration::new(0, 0) - Duration::new(1, 0);
89+
let _ = Duration::new(0, 0) - Duration::new(1, 0);
8890
}
8991

9092
#[test]

0 commit comments

Comments
 (0)