Skip to content

Commit d88d23e

Browse files
committed
Fix warnings in lightning-net-tokio
1 parent 8da37cc commit d88d23e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lightning-net-tokio/src/lib.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@
3131

3232
use bitcoin::secp256k1::PublicKey;
3333

34-
use tokio::net::{tcp, TcpStream};
35-
use tokio::{io, time};
34+
use tokio::net::TcpStream;
35+
use tokio::time;
3636
use tokio::sync::mpsc;
37-
use tokio::io::AsyncWrite;
3837

3938
use lightning::ln::peer_handler;
4039
use lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait;
@@ -231,7 +230,7 @@ impl Connection {
231230
// readable() is allowed to spuriously wake, so we have to handle
232231
// WouldBlock here.
233232
},
234-
Err(e) => break Disconnect::PeerDisconnected,
233+
Err(_) => break Disconnect::PeerDisconnected,
235234
}
236235
},
237236
}
@@ -493,10 +492,10 @@ impl peer_handler::SocketDescriptor for SocketDescriptor {
493492
written_len += res;
494493
if written_len == data.len() { return written_len; }
495494
},
496-
Err(e) => return written_len,
495+
Err(_) => return written_len,
497496
}
498497
},
499-
task::Poll::Ready(Err(e)) => return written_len,
498+
task::Poll::Ready(Err(_)) => return written_len,
500499
task::Poll::Pending => {
501500
// We're queued up for a write event now, but we need to make sure we also
502501
// pause read given we're now waiting on the remote end to ACK (and in

0 commit comments

Comments
 (0)