Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Mar 9, 2024
1 parent 5148e73 commit 2abd20f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,11 @@ impl<'a> Executor<'a> {
let state = self.state();
let runnable = state
.tick_with(|local, steal| {
local.queue.pop().ok()
.or_else(|| {
if steal {
state.queue.pop().ok()
} else {
None
}
})
local
.queue
.pop()
.ok()
.or_else(|| if steal { state.queue.pop().ok() } else { None })
})
.await;
runnable.run();
Expand Down Expand Up @@ -577,7 +574,10 @@ impl State {
}

/// Run a tick using the provided function to get the next task.
async fn tick_with(&self, mut local_ticker: impl FnMut(&LocalQueue, bool) -> Option<Runnable>) -> Runnable {
async fn tick_with(
&self,
mut local_ticker: impl FnMut(&LocalQueue, bool) -> Option<Runnable>,
) -> Runnable {
let local = self.local_queue.get_or_default();

loop {
Expand Down

0 comments on commit 2abd20f

Please sign in to comment.