Remove useless enum

This commit is contained in:
Thomas Eizinger 2021-06-24 20:08:31 +10:00
parent fd23884d74
commit 0e8c5ea918
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96

View file

@ -190,7 +190,7 @@ where
&mut self, &mut self,
_cx: &mut Context<'_>, _cx: &mut Context<'_>,
_params: &mut impl PollParameters, _params: &mut impl PollParameters,
) -> Poll<NetworkBehaviourAction<HandlerInEvent, Self::OutEvent>> { ) -> Poll<NetworkBehaviourAction<(), Self::OutEvent>> {
if let Some(event) = self.events.pop_front() { if let Some(event) = self.events.pop_front() {
return Poll::Ready(NetworkBehaviourAction::GenerateEvent(event)); return Poll::Ready(NetworkBehaviourAction::GenerateEvent(event));
} }
@ -250,13 +250,11 @@ pub enum HandlerOutEvent {
Completed(anyhow::Result<(Uuid, alice::State3), Error>), Completed(anyhow::Result<(Uuid, alice::State3), Error>),
} }
pub enum HandlerInEvent {}
impl<LR> ProtocolsHandler for Handler<LR> impl<LR> ProtocolsHandler for Handler<LR>
where where
LR: LatestRate + Send + 'static, LR: LatestRate + Send + 'static,
{ {
type InEvent = HandlerInEvent; type InEvent = ();
type OutEvent = HandlerOutEvent; type OutEvent = HandlerOutEvent;
type Error = Error; type Error = Error;
type InboundProtocol = protocol::SwapSetup; type InboundProtocol = protocol::SwapSetup;