mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-22 22:31:33 +00:00
swarm/pool: Misc refactoring (#3073)
* Remove unreachable error case Instead of taking the connection out of the map again, construct the event to be returned with the data we already have available. * Remove `Pool::get` and `PoolConnection` These are effectively not used. * Replace `iter_pending_info` with its only usage: `is_dialing` * Add `is_for_same_remote_as` convenience function * Remove `PendingConnection` * Rename `PendingConnectionInfo` to `PendingConnection` With the latter being gone, the name is now free. * Merge `EstablishedConnectionInfo` and `EstablishedConnection` This is a leftover from when `Pool` was still in `libp2p-core` and one of them was a public API and the other one wasn't. All of this is private to `libp2p-swarm` so we no longer need to differentiate. * Don't `pub use` out of `pub(crate)` modules
This commit is contained in:
@ -26,8 +26,6 @@ pub use error::{
|
||||
ConnectionError, PendingConnectionError, PendingInboundConnectionError,
|
||||
PendingOutboundConnectionError,
|
||||
};
|
||||
pub use pool::{ConnectionCounters, ConnectionLimits};
|
||||
pub use pool::{EstablishedConnection, PendingConnection};
|
||||
|
||||
use crate::handler::ConnectionHandler;
|
||||
use crate::upgrade::{InboundUpgradeSend, OutboundUpgradeSend, SendWrapper};
|
||||
|
Reference in New Issue
Block a user