From 4f2f942e188015f187435ffa63ed7f24f9316a7f Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 10 May 2026 09:43:31 -0500 Subject: [PATCH] fmt --- .../runtime/scheduler/current_thread/mod.rs | 4 +-- tokio/src/runtime/task/list.rs | 6 ++-- tokio/src/runtime/tests/mod.rs | 35 +++++++++---------- tokio/src/runtime/tests/task.rs | 17 +++++---- 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/tokio/src/runtime/scheduler/current_thread/mod.rs b/tokio/src/runtime/scheduler/current_thread/mod.rs index 95cc304e1..d12c2e464 100644 --- a/tokio/src/runtime/scheduler/current_thread/mod.rs +++ b/tokio/src/runtime/scheduler/current_thread/mod.rs @@ -2,9 +2,7 @@ use crate::loom::sync::atomic::AtomicBool; use crate::loom::sync::Arc; use crate::runtime::driver::{self, Driver}; use crate::runtime::scheduler::{self, Defer, Inject}; -use crate::runtime::task::{ - self, JoinHandle, OwnedTasks, Schedule, SpawnLocation, Task, -}; +use crate::runtime::task::{self, JoinHandle, OwnedTasks, Schedule, SpawnLocation, Task}; use crate::runtime::{ blocking, context, Config, MetricsBatch, SchedulerMetrics, TaskHooks, TaskMeta, WorkerMetrics, }; diff --git a/tokio/src/runtime/task/list.rs b/tokio/src/runtime/task/list.rs index 3bdd7455f..281b397f1 100644 --- a/tokio/src/runtime/task/list.rs +++ b/tokio/src/runtime/task/list.rs @@ -127,8 +127,7 @@ impl OwnedTasks { T: Future + Send + 'static, T::Output: Send + 'static, { - let (task, notified, join) = - super::new_task(task, scheduler, id, spawned_at, user_data); + let (task, notified, join) = super::new_task(task, scheduler, id, spawned_at, user_data); before_bind(&task); let notified = unsafe { self.bind_inner(task, notified) }; (join, notified) @@ -183,8 +182,7 @@ impl OwnedTasks { T: Future + 'static, T::Output: 'static, { - let (task, notified, join) = - super::new_task(task, scheduler, id, spawned_at, user_data); + let (task, notified, join) = super::new_task(task, scheduler, id, spawned_at, user_data); before_bind(&task); let notified = unsafe { self.bind_inner(task, notified) }; (join, notified) diff --git a/tokio/src/runtime/tests/mod.rs b/tokio/src/runtime/tests/mod.rs index fb470f659..21b3f8981 100644 --- a/tokio/src/runtime/tests/mod.rs +++ b/tokio/src/runtime/tests/mod.rs @@ -19,7 +19,6 @@ mod noop_scheduler { fn schedule(&self, _task: task::Notified) { unreachable!(); } - } } @@ -37,15 +36,14 @@ mod unowned_wrapper { use tracing::Instrument; let span = tracing::trace_span!("test_span"); let task = task.instrument(span); - let (task, handle) = - crate::runtime::task::unowned( - task, - NoopSchedule, - Id::next(), - SpawnLocation::capture(), - #[cfg(tokio_unstable)] - None, - ); + let (task, handle) = crate::runtime::task::unowned( + task, + NoopSchedule, + Id::next(), + SpawnLocation::capture(), + #[cfg(tokio_unstable)] + None, + ); (task.into_notified(), handle) } @@ -56,15 +54,14 @@ mod unowned_wrapper { T: std::future::Future + Send + 'static, T::Output: Send + 'static, { - let (task, handle) = - crate::runtime::task::unowned( - task, - NoopSchedule, - Id::next(), - SpawnLocation::capture(), - #[cfg(tokio_unstable)] - None, - ); + let (task, handle) = crate::runtime::task::unowned( + task, + NoopSchedule, + Id::next(), + SpawnLocation::capture(), + #[cfg(tokio_unstable)] + None, + ); (task.into_notified(), handle) } } diff --git a/tokio/src/runtime/tests/task.rs b/tokio/src/runtime/tests/task.rs index c28b046e4..865d0ccd3 100644 --- a/tokio/src/runtime/tests/task.rs +++ b/tokio/src/runtime/tests/task.rs @@ -421,15 +421,14 @@ impl Runtime { T: 'static + Send + Future, T::Output: 'static + Send, { - let (handle, notified) = - self.0.owned.bind( - future, - self.clone(), - Id::next(), - SpawnLocation::capture(), - #[cfg(tokio_unstable)] - None, - ); + let (handle, notified) = self.0.owned.bind( + future, + self.clone(), + Id::next(), + SpawnLocation::capture(), + #[cfg(tokio_unstable)] + None, + ); if let Some(notified) = notified { self.schedule(notified);