From 71382c46e1444ba6dfe36b52902557857ed246ec Mon Sep 17 00:00:00 2001 From: Benjamin Woodruff Date: Fri, 2 Aug 2024 14:14:49 -0700 Subject: [PATCH] Clean up some of the syntax in the manager's schedule method --- turbopack/crates/turbo-tasks/src/manager.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/turbopack/crates/turbo-tasks/src/manager.rs b/turbopack/crates/turbo-tasks/src/manager.rs index b1ea8f0408c33..dfbd6ce3ca65d 100644 --- a/turbopack/crates/turbo-tasks/src/manager.rs +++ b/turbopack/crates/turbo-tasks/src/manager.rs @@ -509,11 +509,12 @@ impl TurboTasks { let this = self.pin(); let future = async move { - #[allow(clippy::blocks_in_conditions)] - while CURRENT_TASK_STATE - .scope( - RefCell::new(CurrentTaskState::new(this.execution_id_factory.get())), - async { + let mut schedule_again = true; + while schedule_again { + let task_state = + RefCell::new(CurrentTaskState::new(this.execution_id_factory.get())); + schedule_again = CURRENT_TASK_STATE + .scope(task_state, async { if this.stopped.load(Ordering::Acquire) { return false; } @@ -560,10 +561,9 @@ impl TurboTasks { .await }) .await - }, - ) - .await - {} + }) + .await; + } this.finish_primary_job(); anyhow::Ok(()) };