From 2f734f97550014e5424e55523ed46d76b94b737d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 21 Mar 2024 15:53:00 +0000 Subject: [PATCH] Fix unused warning for un-accessed enum variant field in net-tokio --- lightning-net-tokio/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index 41691d9a0..71d63ecad 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -208,7 +208,12 @@ impl Connection { break Disconnect::CloseConnection; } }, - SelectorOutput::B(_) => {}, + SelectorOutput::B(some) => { + // The mpsc Receiver should only return `None` if the write side has been + // dropped, but that shouldn't be possible since its referenced by the Self in + // `us`. + debug_assert!(some.is_some()); + }, SelectorOutput::C(res) => { if res.is_err() { break Disconnect::PeerDisconnected; } match reader.try_read(&mut buf) { -- 2.39.5