mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 09:31:20 +00:00
refactor(swarm)!: don't be generic over Transport
(#3272)
Ever since we moved `Pool` into `libp2p-swarm`, we always use it with the same `Transport`: `Boxed`. It is thus unnecessary for us to be overly generic over what kind of `Transport` we are using. This allows us to remove a few type parameters from the implementation which overall simplifies things. This is technically a breaking change because I am removing a type parameter from two exported type aliases: - `PendingInboundConnectionError` - `PendingOutboundConnectionError` Those have always only be used with `std::io::Error` in our API but it is still a breaking change.
This commit is contained in:
@ -370,10 +370,8 @@ enum PendingInboundConnectionError {
|
||||
ConnectionLimit,
|
||||
}
|
||||
|
||||
impl<TTransErr> From<&libp2p_swarm::PendingInboundConnectionError<TTransErr>>
|
||||
for PendingInboundConnectionError
|
||||
{
|
||||
fn from(error: &libp2p_swarm::PendingInboundConnectionError<TTransErr>) -> Self {
|
||||
impl From<&libp2p_swarm::PendingInboundConnectionError> for PendingInboundConnectionError {
|
||||
fn from(error: &libp2p_swarm::PendingInboundConnectionError) -> Self {
|
||||
match error {
|
||||
libp2p_swarm::PendingInboundConnectionError::WrongPeerId { .. } => {
|
||||
PendingInboundConnectionError::WrongPeerId
|
||||
|
Reference in New Issue
Block a user