From 96c6e6441af22252de8451371bec4a180bcb7845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20RIBEAU?= Date: Fri, 18 Oct 2024 09:54:31 +0200 Subject: [PATCH] moving DEFAULT_CONNECTION_TIMEOUT to swarm.rs --- libp2p/src/builder/phase/build.rs | 3 --- libp2p/src/builder/phase/swarm.rs | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libp2p/src/builder/phase/build.rs b/libp2p/src/builder/phase/build.rs index 6f9e8990e14..8dd68da912f 100644 --- a/libp2p/src/builder/phase/build.rs +++ b/libp2p/src/builder/phase/build.rs @@ -14,9 +14,6 @@ pub struct BuildPhase { pub(crate) connection_timeout: Duration, } -#[allow(unused)] // used in `../swarm.rs` but due to feature flag combinations, clippy gives an unnecessary warning. -pub(crate) const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(10); - impl SwarmBuilder> { diff --git a/libp2p/src/builder/phase/swarm.rs b/libp2p/src/builder/phase/swarm.rs index b8e4bd2b107..e751ad672e4 100644 --- a/libp2p/src/builder/phase/swarm.rs +++ b/libp2p/src/builder/phase/swarm.rs @@ -1,6 +1,9 @@ #[allow(unused_imports)] use super::*; +#[allow(unused)] // used below but due to feature flag combinations, clippy gives an unnecessary warning. +const DEFAULT_CONNECTION_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10); + #[allow(dead_code)] pub struct SwarmPhase { pub(crate) behaviour: B,