diff --git a/tokio/src/runtime/blocking/mod.rs b/tokio/src/runtime/blocking/mod.rs index 3df8070ae..77ff53029 100644 --- a/tokio/src/runtime/blocking/mod.rs +++ b/tokio/src/runtime/blocking/mod.rs @@ -4,9 +4,9 @@ //! compilation. mod pool; -pub(crate) use pool::{spawn_blocking, BlockingPool, Spawner}; #[cfg(feature = "rt-multi-thread")] pub(crate) use pool::spawn_blocking_internal; +pub(crate) use pool::{spawn_blocking, BlockingPool, Spawner}; cfg_fs! { pub(crate) use pool::spawn_mandatory_blocking; diff --git a/tokio/src/runtime/blocking/pool.rs b/tokio/src/runtime/blocking/pool.rs index 1a23baecb..99bfb3150 100644 --- a/tokio/src/runtime/blocking/pool.rs +++ b/tokio/src/runtime/blocking/pool.rs @@ -196,7 +196,9 @@ where R: Send + 'static, { let rt = Handle::current(); - rt.inner.blocking_spawner().spawn_blocking_internal(&rt, func) + rt.inner + .blocking_spawner() + .spawn_blocking_internal(&rt, func) } cfg_fs! { diff --git a/tokio/src/runtime/blocking/schedule.rs b/tokio/src/runtime/blocking/schedule.rs index 8678a8832..76cb8af45 100644 --- a/tokio/src/runtime/blocking/schedule.rs +++ b/tokio/src/runtime/blocking/schedule.rs @@ -20,10 +20,7 @@ pub(crate) struct BlockingSchedule { impl BlockingSchedule { #[cfg_attr(not(feature = "test-util"), allow(unused_variables))] - pub(crate) fn new( - handle: &Handle, - #[cfg(tokio_unstable)] run_task_hooks: bool, - ) -> Self { + pub(crate) fn new(handle: &Handle, #[cfg(tokio_unstable)] run_task_hooks: bool) -> Self { #[cfg(feature = "test-util")] { match &handle.inner {