Remove rustfmt::skip from touched methods
What changed, and why it matters
This commit simply removes formatting-suppression annotations from several Rust methods. It does not change any executable code, logic, or security behavior. It is a code-style cleanup with no security relevance.
No security action needed. Treat as a normal formatting/style cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes eight #[rustfmt::skip] attributes from methods in lightning/src/ln/channelmanager.rs. No statements, signatures, control flow, or data handling are altered. The change only affects whether rustfmt will reformat these methods in the future.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +0 / −8
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 5fd1764..c78a469 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -4364,7 +4364,6 @@ where
.collect()
}
- #[rustfmt::skip]
fn close_channel_internal(&self, chan_id: &ChannelId, counterparty_node_id: &PublicKey, target_feerate_sats_per_1000_weight: Option<u32>, override_shutdown_script: Option<ShutdownScript>) -> Result<(), APIError> {
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
@@ -4558,7 +4557,6 @@ where
/// channel-closing action,
/// (b) [`ChannelManager::handle_error`] needs to be called without holding any locks (except
/// [`ChannelManager::total_consistency_lock`]), which then calls this.
- #[rustfmt::skip]
fn finish_close_channel(&self, mut shutdown_res: ShutdownResult) {
debug_assert_ne!(self.per_peer_state.held_by_thread(), LockHeldState::HeldByThread);
#[cfg(debug_assertions)]
@@ -4668,7 +4666,6 @@ where
/// `peer_msg` should be set when we receive a message from a peer, but not set when the
/// user closes, which will be re-exposed as the `ChannelClosed` reason.
- #[rustfmt::skip]
fn force_close_channel_with_peer(&self, channel_id: &ChannelId, peer_node_id: &PublicKey, reason: ClosureReason)
-> Result<(), APIError> {
let per_peer_state = self.per_peer_state.read().unwrap();
@@ -6354,7 +6351,6 @@ where
self.batch_funding_transaction_generated_intern(temporary_channels, funding_type)
}
- #[rustfmt::skip]
fn batch_funding_transaction_generated_intern(&self, temporary_channels: &[(&ChannelId, &PublicKey)], funding: FundingType) -> Result<(), APIError> {
let mut result = Ok(());
if let FundingType::Checked(funding_transaction) |
@@ -10490,7 +10486,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
Ok(())
}
- #[rustfmt::skip]
fn internal_funding_created(&self, counterparty_node_id: &PublicKey, msg: &msgs::FundingCreated) -> Result<(), MsgHandleErrInternal> {
let best_block = *self.best_block.read().unwrap();
@@ -12443,7 +12438,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
/// attempted in every channel, or in the specifically provided channel.
///
/// [`ChannelSigner`]: crate::sign::ChannelSigner
- #[rustfmt::skip]
pub fn signer_unblocked(&self, channel_opt: Option<(PublicKey, ChannelId)>) {
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
@@ -12588,7 +12582,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
/// Check whether any channels have finished removing all pending updates after a shutdown
/// exchange and can now send a closing_signed.
/// Returns whether any closing_signed messages were generated.
- #[rustfmt::skip]
fn maybe_generate_initial_closing_signed(&self) -> bool {
let mut handle_errors: Vec<(PublicKey, Result<(), _>)> = Vec::new();
let mut has_update = false;
@@ -14580,7 +14573,6 @@ where
/// Calls a function which handles an on-chain event (blocks dis/connected, transactions
/// un/confirmed, etc) on each channel, handling any resulting errors or messages generated by
/// the function.
- #[rustfmt::skip]
fn do_chain_event<FN: Fn(&mut FundedChannel<SP>) -> Result<(Option<FundingConfirmedMessage>, Vec<(HTLCSource, PaymentHash)>, Option<msgs::AnnouncementSignatures>), ClosureReason>>
(&self, height_opt: Option<u32>, f: FN) {
// Note that we MUST NOT end up calling methods on self.chain_monitor here - we're called
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.