@@ -234,7 +234,7 @@ mod tests {
234
234
fn test_from_raw_fd ( ) {
235
235
let ret = unsafe { timerfd_create ( CLOCK_MONOTONIC , TFD_CLOEXEC ) } ;
236
236
let tfd = unsafe { TimerFd :: from_raw_fd ( ret) } ;
237
- assert_eq ! ( tfd. is_armed( ) . unwrap( ) , false ) ;
237
+ assert ! ( ! tfd. is_armed( ) . unwrap( ) ) ;
238
238
}
239
239
240
240
#[ test]
@@ -246,20 +246,20 @@ mod tests {
246
246
#[ test]
247
247
fn test_one_shot ( ) {
248
248
let mut tfd = TimerFd :: new ( ) . expect ( "failed to create timerfd" ) ;
249
- assert_eq ! ( tfd. is_armed( ) . unwrap( ) , false ) ;
249
+ assert ! ( ! tfd. is_armed( ) . unwrap( ) ) ;
250
250
251
251
let dur = Duration :: from_millis ( 200 ) ;
252
252
let now = Instant :: now ( ) ;
253
253
tfd. reset ( dur, None ) . expect ( "failed to arm timer" ) ;
254
254
255
- assert_eq ! ( tfd. is_armed( ) . unwrap( ) , true ) ;
255
+ assert ! ( tfd. is_armed( ) . unwrap( ) ) ;
256
256
257
257
let count = tfd. wait ( ) . expect ( "unable to wait for timer" ) ;
258
258
259
259
assert_eq ! ( count, 1 ) ;
260
260
assert ! ( now. elapsed( ) >= dur) ;
261
261
tfd. clear ( ) . expect ( "unable to clear the timer" ) ;
262
- assert_eq ! ( tfd. is_armed( ) . unwrap( ) , false ) ;
262
+ assert ! ( ! tfd. is_armed( ) . unwrap( ) ) ;
263
263
}
264
264
265
265
#[ test]
@@ -275,6 +275,6 @@ mod tests {
275
275
let count = tfd. wait ( ) . expect ( "unable to wait for timer" ) ;
276
276
assert ! ( count >= 5 , "count = {}" , count) ;
277
277
tfd. clear ( ) . expect ( "unable to clear the timer" ) ;
278
- assert_eq ! ( tfd. is_armed( ) . unwrap( ) , false ) ;
278
+ assert ! ( ! tfd. is_armed( ) . unwrap( ) ) ;
279
279
}
280
280
}
0 commit comments