From 59ed7ac6954edc0513ef7d7b27eeb96d208b56a4 Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Thu, 2 Nov 2023 10:28:49 -0600 Subject: [PATCH] feat(swarm): add `#[non_exhaustive]` to key enums Add `#[non_exhaustive]` to the following enums so that future additions don't cause breaking changes in downstream client code: `FromSwarm`, `ToSwarm`, `SwarmEvent`, `ConnectionHandlerEvent`, `ConnectionEvent`. Related: #4543. Pull-Request: #4581. --- src/behaviour.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/behaviour.rs b/src/behaviour.rs index 06c945eb888..27f5474c924 100644 --- a/src/behaviour.rs +++ b/src/behaviour.rs @@ -593,6 +593,7 @@ impl NetworkBehaviour for Behaviour { self.inner.on_swarm_event(listener_closed) } confirmed @ FromSwarm::ExternalAddrConfirmed(_) => self.inner.on_swarm_event(confirmed), + _ => {} } }