From 8d2b69b4abec56efd654d02cc6ecb5c8deaaa893 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 15 Mar 2021 22:22:58 +0100 Subject: [PATCH] protocols/relay: Ignore IdentifyEvent::Error --- protocols/relay/tests/lib.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/protocols/relay/tests/lib.rs b/protocols/relay/tests/lib.rs index 70584d8a62b..5699cba8300 100644 --- a/protocols/relay/tests/lib.rs +++ b/protocols/relay/tests/lib.rs @@ -1112,18 +1112,15 @@ impl NetworkBehaviourEventProcess for CombinedBehaviour { impl NetworkBehaviourEventProcess for CombinedBehaviour { fn inject_event(&mut self, event: IdentifyEvent) { - match event { - IdentifyEvent::Received { - peer_id, - info: IdentifyInfo { listen_addrs, .. }, - .. - } => { - for addr in listen_addrs { - self.kad.add_address(&peer_id, addr); - } + if let IdentifyEvent::Received { + peer_id, + info: IdentifyInfo { listen_addrs, .. }, + .. + } = event + { + for addr in listen_addrs { + self.kad.add_address(&peer_id, addr); } - IdentifyEvent::Sent { .. } => {} - e => panic!("{:?}", e), } } }