mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Rustfmt the constellation
This commit is contained in:
parent
a97d8b99ef
commit
a2064cef28
9 changed files with 1605 additions and 878 deletions
|
@ -75,7 +75,10 @@ impl TimerScheduler {
|
|||
Ok(TimerSchedulerMsg::Request(req)) => {
|
||||
let TimerEventRequest(_, _, _, delay) = req;
|
||||
let schedule = Instant::now() + Duration::from_millis(delay.get());
|
||||
let event = ScheduledEvent { request: req, for_time: schedule };
|
||||
let event = ScheduledEvent {
|
||||
request: req,
|
||||
for_time: schedule,
|
||||
};
|
||||
scheduled_events.push(event);
|
||||
},
|
||||
// If there is no incoming event, park the thread,
|
||||
|
@ -86,8 +89,7 @@ impl TimerScheduler {
|
|||
Some(event) => thread::park_timeout(event.for_time - now),
|
||||
},
|
||||
// If the channel is closed or we are shutting down, we are done.
|
||||
Ok(TimerSchedulerMsg::Exit) |
|
||||
Err(Disconnected) => break,
|
||||
Ok(TimerSchedulerMsg::Exit) | Err(Disconnected) => break,
|
||||
}
|
||||
}
|
||||
// This thread can terminate if the req_ipc_sender is dropped.
|
||||
|
@ -109,7 +111,7 @@ impl TimerScheduler {
|
|||
let mut shutting_down = false;
|
||||
match req {
|
||||
TimerSchedulerMsg::Exit => shutting_down = true,
|
||||
_ => {}
|
||||
_ => {},
|
||||
}
|
||||
let _ = req_sender.send(req);
|
||||
timeout_thread.unpark();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue