From 45d1d1750cb76bb7340d377efb47166d5af6674c Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 8 Sep 2026 20:09:25 +0800 Subject: [PATCH] chore: drop unnecessary futures dependency Signed-off-by: tison --- Cargo.toml | 2 +- context/command-execute-tokio/Cargo.toml | 5 ++++- core/Cargo.toml | 8 ++++---- core/src/futures_util.rs | 11 +++++++---- services/azure-storage/Cargo.toml | 2 +- services/google/Cargo.toml | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 28c1c2ff..7244154d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,9 +58,9 @@ hmac = "0.13" http = "1" jiff = "0.2" log = "0.4" +p256 = { version = "0.14.0", default-features = false, features = ["ecdsa"] } pem = "4.0" percent-encoding = "2" -p256 = { version = "0.14.0", default-features = false, features = ["ecdsa"] } pretty_assertions = "1.3" prost = "0.14" quick-xml = { version = "0.42.0", features = ["serialize"] } diff --git a/context/command-execute-tokio/Cargo.toml b/context/command-execute-tokio/Cargo.toml index 207acba1..b49e1c6b 100644 --- a/context/command-execute-tokio/Cargo.toml +++ b/context/command-execute-tokio/Cargo.toml @@ -32,7 +32,10 @@ rust-version.workspace = true reqsign-core = { workspace = true } [target.'cfg(not(target_family = "wasm"))'.dependencies] -tokio = { version = "1", default-features = false, features = ["process", "io-util"] } +tokio = { version = "1", default-features = false, features = [ + "process", + "io-util", +] } [dev-dependencies] tokio = { version = "1", features = ["macros", "rt-multi-thread"] } diff --git a/core/Cargo.toml b/core/Cargo.toml index 0b5c26d9..b5986725 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -36,7 +36,6 @@ anyhow = { workspace = true } asyncband = { workspace = true } base64 = { workspace = true } bytes = { workspace = true } -futures = { workspace = true } hex = { workspace = true } hmac = { workspace = true } http = { workspace = true } @@ -51,12 +50,13 @@ rsa = { workspace = true, optional = true } serde = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } -[dev-dependencies] -asyncband = { workspace = true, features = ["oneshot"] } - [target.'cfg(target_os = "windows")'.dependencies] windows-sys = { version = "0.61.0", features = [ "Win32_Foundation", "Win32_UI_Shell", "Win32_System_Com", ] } + +[dev-dependencies] +asyncband = { workspace = true, features = ["oneshot"] } +futures = { workspace = true } diff --git a/core/src/futures_util.rs b/core/src/futures_util.rs index 1eedff1b..5a218f84 100644 --- a/core/src/futures_util.rs +++ b/core/src/futures_util.rs @@ -15,13 +15,16 @@ // specific language governing permissions and limitations // under the License. -/// BoxedFuture is the type alias of [`futures::future::BoxFuture`]. +use std::pin::Pin; + +/// An owned dynamically typed [`Future`] for use in cases where you can't statically type your +/// result or need to add some indirection. #[cfg(not(target_arch = "wasm32"))] -pub type BoxedFuture<'a, T> = futures::future::BoxFuture<'a, T>; +pub type BoxedFuture<'a, T> = Pin + Send + 'a>>; -/// BoxedFuture is the type alias of [`futures::future::LocalBoxFuture`]. +/// `BoxFuture`, but without the `Send` requirement. #[cfg(target_arch = "wasm32")] -pub type BoxedFuture<'a, T> = futures::future::LocalBoxFuture<'a, T>; +pub type BoxedFuture<'a, T> = Pin + 'a>>; /// MaybeSend is a marker to determine whether a type is `Send` or not. /// diff --git a/services/azure-storage/Cargo.toml b/services/azure-storage/Cargo.toml index a396164f..30cc2d1f 100644 --- a/services/azure-storage/Cargo.toml +++ b/services/azure-storage/Cargo.toml @@ -42,8 +42,8 @@ sha1 = { workspace = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] pem = { workspace = true } -rsa = { workspace = true } reqsign-core = { workspace = true, features = ["jwt"] } +rsa = { workspace = true } [dev-dependencies] asyncband = { workspace = true, features = ["semaphore"] } diff --git a/services/google/Cargo.toml b/services/google/Cargo.toml index 7adbb4cc..ca1db23f 100644 --- a/services/google/Cargo.toml +++ b/services/google/Cargo.toml @@ -30,7 +30,6 @@ rust-version.workspace = true all-features = true [features] -default = [] credential-access-boundary-client-side = [ "dep:aes-gcm", "dep:asyncband", @@ -38,6 +37,7 @@ credential-access-boundary-client-side = [ "dep:prost", "dep:zeroize", ] +default = [] [dependencies] aes-gcm = { workspace = true, features = ["zeroize"], optional = true }