Remove unneeded From<Never> impl

This commit is contained in:
Tobin C. Harding 2020-10-16 12:46:47 +11:00
parent 40e97ffdc3
commit 47eaa44f76
2 changed files with 2 additions and 16 deletions

View File

@ -19,7 +19,7 @@ use crate::{
request_response::{AliceToBob, TIMEOUT},
transport, TokioExecutor,
},
Never, SwapParams,
SwapParams,
};
pub type Swarm = libp2p::Swarm<Alice>;
@ -68,13 +68,6 @@ fn new_swarm(listen: Multiaddr) -> Result<Swarm> {
pub enum BehaviourOutEvent {
Request(messenger::BehaviourOutEvent),
ConnectionEstablished(PeerId),
Never, // FIXME: Why do we need this?
}
impl From<Never> for BehaviourOutEvent {
fn from(_: Never) -> Self {
BehaviourOutEvent::Never
}
}
impl From<messenger::BehaviourOutEvent> for BehaviourOutEvent {

View File

@ -19,7 +19,7 @@ use crate::{
request_response::TIMEOUT,
transport, TokioExecutor,
},
Cmd, Never, Rsp,
Cmd, Rsp,
};
pub async fn swap(
@ -85,13 +85,6 @@ fn new_swarm() -> Result<Swarm> {
pub enum BehaviourOutEvent {
Response(messenger::BehaviourOutEvent),
ConnectionEstablished(PeerId),
Never, // FIXME: Why do we need this?
}
impl From<Never> for BehaviourOutEvent {
fn from(_: Never) -> Self {
BehaviourOutEvent::Never
}
}
impl From<messenger::BehaviourOutEvent> for BehaviourOutEvent {