@@ -219,7 +219,7 @@ impl<T> Timer<T> {
219
219
220
220
self . schedule_readiness ( tick) ;
221
221
222
- trace ! ( "inserted timout; slot={}; token={:?}" , slot , token ) ;
222
+ trace ! ( "inserted timout; slot={slot }; token={token :?}" ) ;
223
223
224
224
// Return the new timeout
225
225
Timeout { token, tick }
@@ -266,7 +266,7 @@ impl<T> Timer<T> {
266
266
while self . tick <= target_tick {
267
267
let curr = self . next ;
268
268
269
- trace ! ( "ticking; curr={:?}" , curr ) ;
269
+ trace ! ( "ticking; curr={curr :?}" ) ;
270
270
271
271
if curr == EMPTY {
272
272
self . tick += 1 ;
@@ -292,7 +292,7 @@ impl<T> Timer<T> {
292
292
let links = self . entries [ curr. into ( ) ] . links ;
293
293
294
294
if links. tick <= self . tick {
295
- trace ! ( "triggering; token={:?}" , curr ) ;
295
+ trace ! ( "triggering; token={curr :?}" ) ;
296
296
297
297
// Unlink will also advance self.next
298
298
self . unlink ( & links, curr) ;
@@ -357,7 +357,7 @@ impl<T> Timer<T> {
357
357
}
358
358
359
359
// Attempt to move the wakeup time forward
360
- trace ! ( "advancing the wakeup time; target={}; curr={}" , tick , curr ) ;
360
+ trace ! ( "advancing the wakeup time; target={tick }; curr={curr}" ) ;
361
361
match inner. wakeup_state . compare_exchange_weak (
362
362
curr,
363
363
tick as usize ,
@@ -490,11 +490,7 @@ fn spawn_wakeup_thread(
490
490
491
491
let now_tick = current_tick ( start, tick_ms) ;
492
492
493
- trace ! (
494
- "wakeup thread: sleep_until_tick={:?}; now_tick={:?}" ,
495
- sleep_until_tick,
496
- now_tick
497
- ) ;
493
+ trace ! ( "wakeup thread: sleep_until_tick={sleep_until_tick:?}; now_tick={now_tick:?}" ) ;
498
494
499
495
if now_tick < sleep_until_tick {
500
496
// Calling park_timeout with u64::MAX leads to undefined
@@ -504,19 +500,13 @@ fn spawn_wakeup_thread(
504
500
match tick_ms. checked_mul ( sleep_until_tick - now_tick) {
505
501
Some ( sleep_duration) => {
506
502
trace ! (
507
- "sleeping; tick_ms={}; now_tick={}; sleep_until_tick={}; duration={:?}" ,
508
- tick_ms,
509
- now_tick,
510
- sleep_until_tick,
511
- sleep_duration
503
+ "sleeping; tick_ms={tick_ms}; now_tick={now_tick}; sleep_until_tick={sleep_until_tick}; duration={sleep_duration:?}"
512
504
) ;
513
505
thread:: park_timeout ( Duration :: from_millis ( sleep_duration) ) ;
514
506
}
515
507
None => {
516
508
trace ! (
517
- "sleeping; tick_ms={}; now_tick={}; blocking sleep" ,
518
- tick_ms,
519
- now_tick
509
+ "sleeping; tick_ms={tick_ms}; now_tick={now_tick}; blocking sleep"
520
510
) ;
521
511
thread:: park ( ) ;
522
512
}
0 commit comments