File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use core::time::Duration;
2
2
3
3
#[ test]
4
4
fn creation ( ) {
5
- assert ! ( Duration :: from_secs( 1 ) != Duration :: from_secs( 0 ) ) ;
5
+ assert_ne ! ( Duration :: from_secs( 1 ) , Duration :: from_secs( 0 ) ) ;
6
6
assert_eq ! ( Duration :: from_secs( 1 ) + Duration :: from_secs( 2 ) ,
7
7
Duration :: from_secs( 3 ) ) ;
8
8
assert_eq ! ( Duration :: from_millis( 10 ) + Duration :: from_secs( 4 ) ,
@@ -107,14 +107,12 @@ fn checked_sub() {
107
107
108
108
#[ test]
109
109
#[ should_panic]
110
- #[ cfg( not( miri) ) ] // Miri does not support panics
111
110
fn sub_bad1 ( ) {
112
111
let _ = Duration :: new ( 0 , 0 ) - Duration :: new ( 0 , 1 ) ;
113
112
}
114
113
115
114
#[ test]
116
115
#[ should_panic]
117
- #[ cfg( not( miri) ) ] // Miri does not support panics
118
116
fn sub_bad2 ( ) {
119
117
let _ = Duration :: new ( 0 , 0 ) - Duration :: new ( 1 , 0 ) ;
120
118
}
You can’t perform that action at this time.
0 commit comments