From 98582ae4d409c832e9e8fda534eef88c76254ea1 Mon Sep 17 00:00:00 2001 From: Arnold Loubriat Date: Wed, 26 Feb 2025 23:06:33 +0100 Subject: [PATCH] fix: Don't enable the `zbus/tokio` feature on Unix --- Cargo.lock | 4 ---- platforms/unix/Cargo.toml | 8 ++++---- platforms/unix/src/executor.rs | 15 +-------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4dc67e9d..e44ec3ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1873,14 +1873,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", - "bytes", "libc", "mio", "pin-project-lite", - "signal-hook-registry", "socket2", "tokio-macros", - "tracing", "windows-sys 0.52.0", ] @@ -2687,7 +2684,6 @@ dependencies = [ "serde", "serde_repr", "static_assertions", - "tokio", "tracing", "uds_windows", "windows-sys 0.59.0", diff --git a/platforms/unix/Cargo.toml b/platforms/unix/Cargo.toml index 374ea5d7..b7b8fa71 100644 --- a/platforms/unix/Cargo.toml +++ b/platforms/unix/Cargo.toml @@ -13,16 +13,16 @@ rust-version.workspace = true [features] default = ["async-io"] -async-io = ["dep:async-channel", "dep:async-executor", "dep:async-task", "dep:futures-util", "atspi/async-std", "zbus/async-io"] -tokio = ["dep:tokio", "dep:tokio-stream", "atspi/tokio", "zbus/tokio"] +async-io = ["dep:async-channel", "dep:async-executor", "dep:async-task", "dep:futures-util"] +tokio = ["dep:tokio", "dep:tokio-stream"] [dependencies] accesskit = { version = "0.17.1", path = "../../common" } accesskit_atspi_common = { version = "0.10.1", path = "../atspi-common" } -atspi = { version = "0.25", default-features = false } +atspi = { version = "0.25", default-features = false, features = ["async-std"] } futures-lite = "2.3" serde = "1.0" -zbus = { version = "5.5", default-features = false } +zbus = { version = "5.5", default-features = false, features = ["async-io"] } # async-io support async-channel = { version = "2.1.1", optional = true } diff --git a/platforms/unix/src/executor.rs b/platforms/unix/src/executor.rs index 5ec6425a..f227af42 100644 --- a/platforms/unix/src/executor.rs +++ b/platforms/unix/src/executor.rs @@ -55,20 +55,7 @@ impl Executor<'_> { #[cfg(feature = "tokio")] { - #[cfg(tokio_unstable)] - { - Task(Some( - tokio::task::Builder::new() - .name(name) - .spawn(future) - // SAFETY: Looking at the code, this call always returns an `Ok`. - .unwrap(), - )) - } - #[cfg(not(tokio_unstable))] - { - Task(Some(tokio::task::spawn(future))) - } + Task(Some(tokio::task::spawn(future))) } }