Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] clippy new warnings in rustc 1.86.0 (05f9846f8 2025-03-31) #3710

Merged
merged 3 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci/check-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
12 changes: 6 additions & 6 deletions lightning-types/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<https://arxiv.org/pdf/2205.12737.pdf>`.
/// for a node to see an update as seen on `<https://arxiv.org/pdf/2205.12737.pdf>`.
/// * `EXPIRE_PREV_CONFIG_TICKS` = convergence_delay / tick_interval
pub(crate) const EXPIRE_PREV_CONFIG_TICKS: usize = 5;

Expand Down Expand Up @@ -8548,10 +8548,7 @@ impl<SP: Deref> FundedChannel<SP> 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
Expand Down
Loading