Skip to content

Commit 06fb142

Browse files
authored
Merge pull request #3710 from vincenzopalazzo/macros/docs-fix
[RFC] clippy new warnings in rustc 1.86.0 (05f9846f8 2025-03-31)
2 parents 187a8b7 + 4892a57 commit 06fb142

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

ci/check-lint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ RUSTFLAGS='-D warnings' cargo clippy -- \
9494
-A clippy::unnecessary_unwrap \
9595
-A clippy::unused_unit \
9696
-A clippy::useless_conversion \
97-
-A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70`
97+
-A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70` \
98+
-A clippy::manual_repeat_n `# to be removed once we hit MSRV 1.86`

lightning-types/src/features.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
//! - `SCIDPrivacy` - supply channel aliases for routing
6060
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
6161
//! - `PaymentMetadata` - include additional data in invoices which is passed to recipients in the
62-
//! onion.
63-
//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for
64-
//! more).
62+
//! onion.
63+
//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for
64+
//! more).
6565
//! - `ZeroConf` - supports accepting HTLCs and using channels prior to funding confirmation
66-
//! (see
67-
//! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message)
68-
//! for more info).
66+
//! (see
67+
//! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message)
68+
//! for more info).
6969
//! - `Keysend` - send funds to a node without an invoice
7070
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
7171
//! - `Trampoline` - supports receiving and forwarding Trampoline payments

lightning/src/ln/channel.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ pub(crate) const MIN_AFFORDABLE_HTLC_COUNT: usize = 4;
11531153
///
11541154
/// * The expected interval between ticks (1 minute).
11551155
/// * The average convergence delay of updates across the network, i.e., ~300 seconds on average
1156-
/// for a node to see an update as seen on `<https://arxiv.org/pdf/2205.12737.pdf>`.
1156+
/// for a node to see an update as seen on `<https://arxiv.org/pdf/2205.12737.pdf>`.
11571157
/// * `EXPIRE_PREV_CONFIG_TICKS` = convergence_delay / tick_interval
11581158
pub(crate) const EXPIRE_PREV_CONFIG_TICKS: usize = 5;
11591159

@@ -8548,10 +8548,7 @@ impl<SP: Deref> FundedChannel<SP> where
85488548
Ok(res) => res,
85498549
Err(_) => return None,
85508550
};
8551-
match self.sign_channel_announcement(node_signer, announcement) {
8552-
Ok(res) => Some(res),
8553-
Err(_) => None,
8554-
}
8551+
self.sign_channel_announcement(node_signer, announcement).ok()
85558552
}
85568553

85578554
/// May panic if called on a channel that wasn't immediately-previously

0 commit comments

Comments
 (0)