mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 01:01:34 +00:00
feat(swarm)!: remove unused PendingConnectionError::Io
variant (#3373)
This variant is never constructed.
This commit is contained in:
@ -101,10 +101,6 @@ pub enum PendingConnectionError<TTransErr> {
|
||||
obtained: PeerId,
|
||||
endpoint: ConnectedPoint,
|
||||
},
|
||||
|
||||
/// An I/O error occurred on the connection.
|
||||
// TODO: Eventually this should also be a custom error?
|
||||
IO(io::Error),
|
||||
}
|
||||
|
||||
impl<T> PendingConnectionError<T> {
|
||||
@ -118,7 +114,6 @@ impl<T> PendingConnectionError<T> {
|
||||
PendingConnectionError::WrongPeerId { obtained, endpoint } => {
|
||||
PendingConnectionError::WrongPeerId { obtained, endpoint }
|
||||
}
|
||||
PendingConnectionError::IO(e) => PendingConnectionError::IO(e),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,7 +124,6 @@ where
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
PendingConnectionError::IO(err) => write!(f, "Pending connection: I/O error: {err}"),
|
||||
PendingConnectionError::Aborted => write!(f, "Pending connection: Aborted."),
|
||||
PendingConnectionError::Transport(err) => {
|
||||
write!(
|
||||
@ -156,7 +150,6 @@ where
|
||||
{
|
||||
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||
match self {
|
||||
PendingConnectionError::IO(err) => Some(err),
|
||||
PendingConnectionError::Transport(_) => None,
|
||||
PendingConnectionError::WrongPeerId { .. } => None,
|
||||
PendingConnectionError::Aborted => None,
|
||||
|
@ -1611,7 +1611,6 @@ impl From<PendingOutboundConnectionError> for DialError {
|
||||
PendingConnectionError::WrongPeerId { obtained, endpoint } => {
|
||||
DialError::WrongPeerId { obtained, endpoint }
|
||||
}
|
||||
PendingConnectionError::IO(e) => DialError::ConnectionIo(e),
|
||||
PendingConnectionError::Transport(e) => DialError::Transport(e),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user