From 47eaa44f7676846fbbecd0523e7815c0d1fc6d14 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 16 Oct 2020 12:46:47 +1100 Subject: [PATCH] Remove unneeded From impl --- swap/src/alice.rs | 9 +-------- swap/src/bob.rs | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/swap/src/alice.rs b/swap/src/alice.rs index 4fae9003..b61c6e58 100644 --- a/swap/src/alice.rs +++ b/swap/src/alice.rs @@ -19,7 +19,7 @@ use crate::{ request_response::{AliceToBob, TIMEOUT}, transport, TokioExecutor, }, - Never, SwapParams, + SwapParams, }; pub type Swarm = libp2p::Swarm; @@ -68,13 +68,6 @@ fn new_swarm(listen: Multiaddr) -> Result { pub enum BehaviourOutEvent { Request(messenger::BehaviourOutEvent), ConnectionEstablished(PeerId), - Never, // FIXME: Why do we need this? -} - -impl From for BehaviourOutEvent { - fn from(_: Never) -> Self { - BehaviourOutEvent::Never - } } impl From for BehaviourOutEvent { diff --git a/swap/src/bob.rs b/swap/src/bob.rs index 33e4520b..8bef0b71 100644 --- a/swap/src/bob.rs +++ b/swap/src/bob.rs @@ -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 { pub enum BehaviourOutEvent { Response(messenger::BehaviourOutEvent), ConnectionEstablished(PeerId), - Never, // FIXME: Why do we need this? -} - -impl From for BehaviourOutEvent { - fn from(_: Never) -> Self { - BehaviourOutEvent::Never - } } impl From for BehaviourOutEvent {