Skip to content

Commit 3a9fe20

Browse files
authored
Merge pull request #2954 from TheBlueMatt/2024-03-test-ci-beta-fail
Fix new warnings causing CI build failures on rustc beta
2 parents 3eb61f7 + 2f734f9 commit 3a9fe20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+141
-152
lines changed

lightning-block-sync/src/init.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,6 @@ mod tests {
252252
use crate::test_utils::{Blockchain, MockChainListener};
253253
use super::*;
254254

255-
use bitcoin::network::constants::Network;
256-
257255
#[tokio::test]
258256
async fn sync_from_same_chain() {
259257
let chain = Blockchain::default().with_height(4);

lightning-invoice/src/de.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#[cfg(feature = "std")]
22
use std::error;
3+
#[cfg(not(feature = "std"))]
34
use core::convert::TryFrom;
45
use core::fmt;
56
use core::fmt::{Display, Formatter};

lightning-invoice/src/utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use secp256k1::PublicKey;
1919
use alloc::collections::{btree_map, BTreeMap};
2020
use core::ops::Deref;
2121
use core::time::Duration;
22+
#[cfg(not(feature = "std"))]
2223
use core::iter::Iterator;
2324

2425
/// Utility to create an invoice that can be paid to one of multiple nodes, or a "phantom invoice."

lightning-invoice/tests/ser_de.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ use bitcoin::address::WitnessVersion;
88
use bitcoin::{PubkeyHash, ScriptHash};
99
use bitcoin::hashes::hex::FromHex;
1010
use bitcoin::hashes::{sha256, Hash};
11-
use lightning::ln::PaymentSecret;
12-
use lightning::routing::gossip::RoutingFees;
13-
use lightning::routing::router::{RouteHint, RouteHintHop};
1411
use lightning_invoice::*;
1512
use secp256k1::PublicKey;
1613
use secp256k1::ecdsa::{RecoverableSignature, RecoveryId};

lightning-net-tokio/src/lib.rs

Lines changed: 6 additions & 2 deletions
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) {
@@ -556,7 +561,6 @@ mod tests {
556561
use lightning::ln::features::*;
557562
use lightning::ln::msgs::*;
558563
use lightning::ln::peer_handler::{MessageHandler, PeerManager};
559-
use lightning::ln::features::NodeFeatures;
560564
use lightning::routing::gossip::NodeId;
561565
use lightning::events::*;
562566
use lightning::util::test_utils::TestNodeSigner;

lightning-persister/src/fs_store.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ mod tests {
379379
use lightning::ln::functional_test_utils::*;
380380
use lightning::util::test_utils;
381381
use lightning::util::persist::read_channel_monitors;
382-
use std::fs;
383382
use std::str::FromStr;
384383

385384
impl Drop for FilesystemStore {

lightning-rapid-gossip-sync/src/processing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use crate::{GraphSyncError, RapidGossipSync};
1919
#[cfg(all(feature = "std", not(test)))]
2020
use std::time::{SystemTime, UNIX_EPOCH};
2121

22-
#[cfg(not(feature = "std"))]
22+
#[cfg(all(not(feature = "std"), not(test)))]
2323
use alloc::{vec::Vec, borrow::ToOwned};
2424

2525
/// The purpose of this prefix is to identify the serialization format, should other rapid gossip

lightning/src/blinded_path/message.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
use bitcoin::secp256k1::{self, PublicKey, Secp256k1, SecretKey};
22

3+
#[allow(unused_imports)]
4+
use crate::prelude::*;
5+
36
use crate::blinded_path::{BlindedHop, BlindedPath};
47
use crate::blinded_path::utils;
58
use crate::io;
69
use crate::io::Cursor;
710
use crate::ln::onion_utils;
811
use crate::onion_message::packet::ControlTlvs;
9-
use crate::prelude::*;
1012
use crate::sign::{NodeSigner, Recipient};
1113
use crate::crypto::streams::ChaChaPolyReadAdapter;
1214
use crate::util::ser::{FixedLengthReader, LengthReadableArgs, Writeable, Writer};

lightning/src/blinded_path/payment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ use crate::ln::channelmanager::CounterpartyForwardingInfo;
1212
use crate::ln::features::BlindedHopFeatures;
1313
use crate::ln::msgs::DecodeError;
1414
use crate::offers::invoice::BlindedPayInfo;
15-
use crate::prelude::*;
1615
use crate::util::ser::{HighZeroBytesDroppedBigSize, Readable, Writeable, Writer};
1716

18-
use core::convert::TryFrom;
17+
#[allow(unused_imports)]
18+
use crate::prelude::*;
1919

2020
/// An intermediate node, its outbound channel, and relay parameters.
2121
#[derive(Clone, Debug)]

lightning/src/blinded_path/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ use crate::crypto::streams::ChaChaPolyWriteAdapter;
2323
use crate::util::ser::{Readable, Writeable};
2424

2525
use crate::io;
26+
27+
#[allow(unused_imports)]
2628
use crate::prelude::*;
2729

2830
// TODO: DRY with onion_utils::construct_onion_keys_callback

0 commit comments

Comments
 (0)