From df9a9adaa872604dbb6a3329696eb002a51a158c Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 12 Jan 2025 03:48:43 -0500 Subject: [PATCH] Remove direct dependencies of void, async-trait --- Cargo.lock | 3 --- coordinator/p2p/libp2p/Cargo.toml | 1 - coordinator/p2p/libp2p/src/swarm.rs | 4 ++-- tests/coordinator/Cargo.toml | 1 - tests/full-stack/Cargo.toml | 2 -- 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f93ff6c1..980d9405 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8363,7 +8363,6 @@ dependencies = [ "serai-task", "tokio", "tributary-sdk", - "void", "zeroize", ] @@ -8402,7 +8401,6 @@ dependencies = [ name = "serai-coordinator-tests" version = "0.1.0" dependencies = [ - "async-trait", "blake2", "borsh", "ciphersuite", @@ -8605,7 +8603,6 @@ dependencies = [ name = "serai-full-stack-tests" version = "0.1.0" dependencies = [ - "async-trait", "bitcoin-serai", "curve25519-dalek", "dockertest", diff --git a/coordinator/p2p/libp2p/Cargo.toml b/coordinator/p2p/libp2p/Cargo.toml index 7a393588..948df9a4 100644 --- a/coordinator/p2p/libp2p/Cargo.toml +++ b/coordinator/p2p/libp2p/Cargo.toml @@ -33,7 +33,6 @@ serai-client = { path = "../../../substrate/client", default-features = false, f serai-cosign = { path = "../../cosign" } tributary-sdk = { path = "../../tributary-sdk" } -void = { version = "1", default-features = false } futures-util = { version = "0.3", default-features = false, features = ["std"] } tokio = { version = "1", default-features = false, features = ["sync"] } libp2p = { version = "0.52", default-features = false, features = ["tokio", "tcp", "noise", "yamux", "ping", "request-response", "gossipsub", "macros"] } diff --git a/coordinator/p2p/libp2p/src/swarm.rs b/coordinator/p2p/libp2p/src/swarm.rs index a9b13bf0..a8c9556c 100644 --- a/coordinator/p2p/libp2p/src/swarm.rs +++ b/coordinator/p2p/libp2p/src/swarm.rs @@ -225,8 +225,8 @@ impl SwarmTask { SwarmEvent::Behaviour( BehaviorEvent::AllowList(event) | BehaviorEvent::ConnectionLimits(event) ) => { - // Ensure these are unreachable cases, not actual events - let _: void::Void = event; + // This *is* an exhaustive match as these events are empty enums + match event {} } SwarmEvent::Behaviour( BehaviorEvent::Ping(ping::Event { peer: _, connection, result, }) diff --git a/tests/coordinator/Cargo.toml b/tests/coordinator/Cargo.toml index ca7a10d6..6038da38 100644 --- a/tests/coordinator/Cargo.toml +++ b/tests/coordinator/Cargo.toml @@ -19,7 +19,6 @@ workspace = true [dependencies] hex = "0.4" -async-trait = "0.1" zeroize = { version = "1", default-features = false } rand_core = { version = "0.6", default-features = false } diff --git a/tests/full-stack/Cargo.toml b/tests/full-stack/Cargo.toml index a9dbdc63..5bafb346 100644 --- a/tests/full-stack/Cargo.toml +++ b/tests/full-stack/Cargo.toml @@ -19,8 +19,6 @@ workspace = true [dependencies] hex = "0.4" -async-trait = "0.1" - zeroize = { version = "1", default-features = false } rand_core = { version = "0.6", default-features = false }