Skip to content

Commit

Permalink
moving DEFAULT_CONNECTION_TIMEOUT to swarm.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-frb committed Oct 18, 2024
1 parent 1b37ad0 commit 96c6e64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libp2p/src/builder/phase/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ pub struct BuildPhase<T, B> {
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<Provider, T: AuthenticatedMultiplexedTransport, B: libp2p_swarm::NetworkBehaviour>
SwarmBuilder<Provider, BuildPhase<T, B>>
{
Expand Down
3 changes: 3 additions & 0 deletions libp2p/src/builder/phase/swarm.rs
Original file line number Diff line number Diff line change
@@ -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<T, B> {
pub(crate) behaviour: B,
Expand Down

0 comments on commit 96c6e64

Please sign in to comment.