chore: clippy: remove irrefutable `let...else` patterns in DA (#830)

This commit is contained in:
Youngjoon Lee 2024-10-20 01:49:48 +09:00 committed by GitHub
parent 26ae6c0a5d
commit 163cc2ce64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 9 deletions

View File

@ -540,9 +540,7 @@ impl<M: MembershipHandler<Id = PeerId, NetworkId = SubnetworkId> + 'static> Netw
connection_id: ConnectionId, connection_id: ConnectionId,
event: THandlerOutEvent<Self>, event: THandlerOutEvent<Self>,
) { ) {
let Either::Left(event) = event else { let Either::Left(event) = event;
unreachable!()
};
self.stream_behaviour self.stream_behaviour
.on_connection_handler_event(peer_id, connection_id, event) .on_connection_handler_event(peer_id, connection_id, event)
} }

View File

@ -111,9 +111,7 @@ impl<M: MembershipHandler<Id = PeerId, NetworkId = SubnetworkId> + 'static> Netw
connection_id: ConnectionId, connection_id: ConnectionId,
event: THandlerOutEvent<Self>, event: THandlerOutEvent<Self>,
) { ) {
let Either::Left(event) = event else { let Either::Left(event) = event;
unreachable!()
};
self.stream_behaviour self.stream_behaviour
.on_connection_handler_event(peer_id, connection_id, event) .on_connection_handler_event(peer_id, connection_id, event)
} }

View File

@ -630,9 +630,7 @@ impl<M: MembershipHandler<Id = PeerId, NetworkId = SubnetworkId> + 'static> Netw
connection_id: ConnectionId, connection_id: ConnectionId,
event: THandlerOutEvent<Self>, event: THandlerOutEvent<Self>,
) { ) {
let Either::Left(event) = event else { let Either::Left(event) = event;
unreachable!()
};
self.stream_behaviour self.stream_behaviour
.on_connection_handler_event(peer_id, connection_id, event) .on_connection_handler_event(peer_id, connection_id, event)
} }