projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
190867c
)
Fix warnings in `lightning-net-tokio`
author
Elias Rohrer
<dev@tnull.de>
Tue, 12 Sep 2023 11:47:09 +0000
(13:47 +0200)
committer
Elias Rohrer
<dev@tnull.de>
Thu, 14 Sep 2023 07:09:27 +0000
(09:09 +0200)
lightning-net-tokio/src/lib.rs
patch
|
blob
|
history
diff --git
a/lightning-net-tokio/src/lib.rs
b/lightning-net-tokio/src/lib.rs
index 06aed3194f9bc18e27d146ea9cbedc23604edfe8..5527d85adf6f819e0b02e3ad05e18cc7c4426ae6 100644
(file)
--- a/
lightning-net-tokio/src/lib.rs
+++ b/
lightning-net-tokio/src/lib.rs
@@
-31,10
+31,9
@@
use bitcoin::secp256k1::PublicKey;
use bitcoin::secp256k1::PublicKey;
-use tokio::net::
{tcp, TcpStream}
;
-use tokio::
{io, time}
;
+use tokio::net::
TcpStream
;
+use tokio::
time
;
use tokio::sync::mpsc;
use tokio::sync::mpsc;
-use tokio::io::AsyncWrite;
use lightning::ln::peer_handler;
use lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait;
use lightning::ln::peer_handler;
use lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait;
@@
-231,7
+230,7
@@
impl Connection {
// readable() is allowed to spuriously wake, so we have to handle
// WouldBlock here.
},
// readable() is allowed to spuriously wake, so we have to handle
// WouldBlock here.
},
- Err(
e
) => break Disconnect::PeerDisconnected,
+ Err(
_
) => break Disconnect::PeerDisconnected,
}
},
}
}
},
}
@@
-493,10
+492,10
@@
impl peer_handler::SocketDescriptor for SocketDescriptor {
written_len += res;
if written_len == data.len() { return written_len; }
},
written_len += res;
if written_len == data.len() { return written_len; }
},
- Err(
e
) => return written_len,
+ Err(
_
) => return written_len,
}
},
}
},
- task::Poll::Ready(Err(
e
)) => return written_len,
+ task::Poll::Ready(Err(
_
)) => return written_len,
task::Poll::Pending => {
// We're queued up for a write event now, but we need to make sure we also
// pause read given we're now waiting on the remote end to ACK (and in
task::Poll::Pending => {
// We're queued up for a write event now, but we need to make sure we also
// pause read given we're now waiting on the remote end to ACK (and in