Fix unused warning for un-accessed enum variant field in net-tokio
[rust-lightning] / lightning-net-tokio / src / lib.rs
index 41691d9a0798b87133b90d4d7cd7b713349bafed..71d63ecadcfa96e3b7fbd4a2c7c1076af2470e25 100644 (file)
@@ -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) {