diff --git a/libp2p/src/builder/phase.rs b/libp2p/src/builder/phase.rs index 5bb0d948fc1..f8f1672f952 100644 --- a/libp2p/src/builder/phase.rs +++ b/libp2p/src/builder/phase.rs @@ -16,23 +16,22 @@ mod websocket; use bandwidth_logging::*; use bandwidth_metrics::*; +pub use behaviour::BehaviourError; use behaviour::*; use build::*; use dns::*; use libp2p_core::{muxing::StreamMuxerBox, Transport}; use libp2p_identity::Keypair; +pub use other_transport::TransportError; use other_transport::*; use provider::*; use quic::*; use relay::*; use swarm::*; use tcp::*; -use websocket::*; - -pub use behaviour::BehaviourError; -pub use other_transport::TransportError; #[cfg(all(not(target_arch = "wasm32"), feature = "websocket"))] pub use websocket::WebsocketError; +use websocket::*; use super::{ select_muxer::SelectMuxerUpgrade, select_security::SelectSecurityUpgrade, SwarmBuilder, diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index a20d58b97fc..91513c83559 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -1497,14 +1497,17 @@ impl Config { /// /// Defaults to 10s. /// - /// Typically, you shouldn't _need_ to modify this default as connections will be kept alive whilst they are "in use" (see below). - /// Depending on the application's usecase, it may be desirable to keep connections alive despite them not being in use. + /// Typically, you shouldn't _need_ to modify this default as connections will be kept alive + /// whilst they are "in use" (see below). Depending on the application's usecase, it may be + /// desirable to keep connections alive despite them not being in use. /// /// A connection is considered idle if: /// - There are no active inbound streams. /// - There are no active outbounds streams. - /// - There are no pending outbound streams (i.e. all streams requested via [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed). - /// - Every [`ConnectionHandler`] returns `false` from [`ConnectionHandler::connection_keep_alive`]. + /// - There are no pending outbound streams (i.e. all streams requested via + /// [`ConnectionHandlerEvent::OutboundSubstreamRequest`] have completed). + /// - Every [`ConnectionHandler`] returns `false` from + /// [`ConnectionHandler::connection_keep_alive`]. /// /// Once all these conditions are true, the idle connection timeout starts ticking. pub fn with_idle_connection_timeout(mut self, timeout: Duration) -> Self { diff --git a/transports/dns/src/lib.rs b/transports/dns/src/lib.rs index d777d54a5f2..7e3cf5d3c37 100644 --- a/transports/dns/src/lib.rs +++ b/transports/dns/src/lib.rs @@ -160,7 +160,7 @@ use async_trait::async_trait; use futures::{future::BoxFuture, prelude::*}; pub use hickory_resolver::{ config::{ResolverConfig, ResolverOpts}, - {ResolveError, ResolveErrorKind}, + ResolveError, ResolveErrorKind, }; use hickory_resolver::{ lookup::{Ipv4Lookup, Ipv6Lookup, TxtLookup},