From: Matt Corallo Date: Thu, 21 Mar 2024 15:53:00 +0000 (+0000) Subject: Fix unused warning for un-accessed enum variant field in net-tokio X-Git-Tag: v0.0.123-beta~16^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=refs%2Fheads%2F2024-03-test-ci-beta-fail;p=rust-lightning Fix unused warning for un-accessed enum variant field in net-tokio --- 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) {