diff --git a/ci/check-lint.sh b/ci/check-lint.sh index b66a856797a..1c6229e84f6 100755 --- a/ci/check-lint.sh +++ b/ci/check-lint.sh @@ -94,4 +94,5 @@ RUSTFLAGS='-D warnings' cargo clippy -- \ -A clippy::unnecessary_unwrap \ -A clippy::unused_unit \ -A clippy::useless_conversion \ - -A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70` + -A clippy::unnecessary_map_or `# to be removed once we hit MSRV 1.70` \ + -A clippy::manual_repeat_n `# to be removed once we hit MSRV 1.86` diff --git a/lightning-types/src/features.rs b/lightning-types/src/features.rs index 2aecdbc1415..1b7f880314f 100644 --- a/lightning-types/src/features.rs +++ b/lightning-types/src/features.rs @@ -59,13 +59,13 @@ //! - `SCIDPrivacy` - supply channel aliases for routing //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information). //! - `PaymentMetadata` - include additional data in invoices which is passed to recipients in the -//! onion. -//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for -//! more). +//! onion. +//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for +//! more). //! - `ZeroConf` - supports accepting HTLCs and using channels prior to funding confirmation -//! (see -//! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message) -//! for more info). +//! (see +//! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message) +//! for more info). //! - `Keysend` - send funds to a node without an invoice //! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information). //! - `Trampoline` - supports receiving and forwarding Trampoline payments diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 005ec566f0e..02a63ee2665 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -1153,7 +1153,7 @@ pub(crate) const MIN_AFFORDABLE_HTLC_COUNT: usize = 4; /// /// * The expected interval between ticks (1 minute). /// * The average convergence delay of updates across the network, i.e., ~300 seconds on average -/// for a node to see an update as seen on ``. +/// for a node to see an update as seen on ``. /// * `EXPIRE_PREV_CONFIG_TICKS` = convergence_delay / tick_interval pub(crate) const EXPIRE_PREV_CONFIG_TICKS: usize = 5; @@ -8548,10 +8548,7 @@ impl FundedChannel where Ok(res) => res, Err(_) => return None, }; - match self.sign_channel_announcement(node_signer, announcement) { - Ok(res) => Some(res), - Err(_) => None, - } + self.sign_channel_announcement(node_signer, announcement).ok() } /// May panic if called on a channel that wasn't immediately-previously