From eeb3504d5f5ce783b7c7333afe3814aed2255746 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Thu, 17 Feb 2022 21:12:37 +0100 Subject: [PATCH] swarm/src/lib: Rework connection exports (#2525) --- swarm/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index faf142fa0ea..d2e17999b93 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -67,7 +67,10 @@ pub use behaviour::{ CloseConnection, NetworkBehaviour, NetworkBehaviourAction, NetworkBehaviourEventProcess, NotifyHandler, PollParameters, }; -pub use connection::{PendingConnectionError, PendingInboundConnectionError}; +pub use connection::{ + ConnectionCounters, ConnectionError, ConnectionLimit, ConnectionLimits, PendingConnectionError, + PendingInboundConnectionError, PendingOutboundConnectionError, +}; pub use protocols_handler::{ IntoProtocolsHandler, IntoProtocolsHandlerSelect, KeepAlive, OneShotHandler, OneShotHandlerConfig, ProtocolsHandler, ProtocolsHandlerEvent, ProtocolsHandlerSelect, @@ -75,13 +78,8 @@ pub use protocols_handler::{ }; pub use registry::{AddAddressResult, AddressRecord, AddressScore}; -use crate::connection::IncomingInfo; -use crate::connection::{pool::PoolEvent, ListenersEvent, ListenersStream}; -use connection::pool::{ConnectionCounters, ConnectionLimits, Pool, PoolConfig}; -use connection::{ - ConnectionError, ConnectionLimit, EstablishedConnection, PendingOutboundConnectionError, - Substream, -}; +use connection::pool::{Pool, PoolConfig, PoolEvent}; +use connection::{EstablishedConnection, IncomingInfo, ListenersEvent, ListenersStream, Substream}; use dial_opts::{DialOpts, PeerCondition}; use either::Either; use futures::{executor::ThreadPoolBuilder, prelude::*, stream::FusedStream};