Skip to content

Commit 2f734f9

Browse files
committed
Fix unused warning for un-accessed enum variant field in net-tokio
1 parent ef2e739 commit 2f734f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning-net-tokio/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,12 @@ impl Connection {
208208
break Disconnect::CloseConnection;
209209
}
210210
},
211-
SelectorOutput::B(_) => {},
211+
SelectorOutput::B(some) => {
212+
// The mpsc Receiver should only return `None` if the write side has been
213+
// dropped, but that shouldn't be possible since its referenced by the Self in
214+
// `us`.
215+
debug_assert!(some.is_some());
216+
},
212217
SelectorOutput::C(res) => {
213218
if res.is_err() { break Disconnect::PeerDisconnected; }
214219
match reader.try_read(&mut buf) {

0 commit comments

Comments
 (0)