]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix unrelated warnings
authorElias Rohrer <ero@tnull.de>
Mon, 17 Apr 2023 11:41:24 +0000 (13:41 +0200)
committerElias Rohrer <ero@tnull.de>
Wed, 19 Apr 2023 08:25:04 +0000 (10:25 +0200)
Just two trivial compiler warnings that are unrelated to the changes
made here.

lightning-net-tokio/src/lib.rs
lightning/src/ln/channelmanager.rs

index 37c9ddad76204ee68dda7656a81772bb97ef6fca..48f1736d0c2296988c5d0f7c2c110421d5ca319f 100644 (file)
@@ -189,7 +189,7 @@ impl Connection {
                        // our timeslice to another task we may just spin on this peer, starving other peers
                        // and eventually disconnecting them for ping timeouts. Instead, we explicitly yield
                        // here.
-                       tokio::task::yield_now().await;
+                       let _ = tokio::task::yield_now().await;
                };
                let writer_option = us.lock().unwrap().writer.take();
                if let Some(mut writer) = writer_option {
index 9f403f85b2f0aec6b841961fa47fd7e6bce424e7..213f3b954a2e2200a419d6da36a9fcdba0cc8a27 100644 (file)
@@ -7947,8 +7947,6 @@ mod tests {
        use bitcoin::hashes::Hash;
        use bitcoin::hashes::sha256::Hash as Sha256;
        use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey};
-       #[cfg(feature = "std")]
-       use core::time::Duration;
        use core::sync::atomic::Ordering;
        use crate::events::{Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider, ClosureReason};
        use crate::ln::{PaymentPreimage, PaymentHash, PaymentSecret};