Run `cargo fmt` on `maybe_downgrade_channel_features`
What changed, and why it matters
This commit is purely a code-formatting cleanup. It removes a `#[rustfmt::skip]` annotation and lets Rust's automatic formatter re-indent a function. No logic, behavior, or security properties of the code change.
No security action needed. Treat as a normal style/formatting commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff only reformats maybe_downgrade_channel_features in lightning/src/ln/channel.rs. The #[rustfmt::skip] attribute is removed, line breaks and indentation are adjusted, and one assignment is split across lines. There are no semantic changes to conditionals, function calls, variable assignments, or control flow.
Changed components
lightning/src/ln/channel.rsInspect captured patch +6 / −9
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index 58dd6ea..863256f 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -6537,17 +6537,15 @@ impl<SP: SignerProvider> ChannelContext<SP> {
/// If we receive an error message when attempting to open a channel, it may only be a rejection
/// of the channel type we tried, not of our ability to open any channel at all. We can see if a
/// downgrade of channel features would be possible so that we can still open the channel.
- #[rustfmt::skip]
pub(crate) fn maybe_downgrade_channel_features<F: FeeEstimator>(
&mut self, funding: &mut FundingScope, fee_estimator: &LowerBoundedFeeEstimator<F>,
user_config: &UserConfig, their_features: &InitFeatures,
) -> Result<(), ()> {
- if !funding.is_outbound() ||
- !matches!(
+ if !funding.is_outbound()
+ || !matches!(
self.channel_state, ChannelState::NegotiatingFunding(flags)
if flags == NegotiatingFundingFlags::OUR_INIT_SENT
- )
- {
+ ) {
return Err(());
}
if funding.get_channel_type() == &ChannelTypeFeatures::only_static_remote_key() {
@@ -6579,10 +6577,9 @@ impl<SP: SignerProvider> ChannelContext<SP> {
let next_channel_type = get_initial_channel_type(user_config, &eligible_features);
- self.feerate_per_kw = selected_commitment_sat_per_1000_weight(
- &fee_estimator, &next_channel_type,
- );
- funding.channel_transaction_parameters.channel_type_features = next_channel_type;
+ self.feerate_per_kw =
+ selected_commitment_sat_per_1000_weight(&fee_estimator, &next_channel_type);
+ funding.channel_transaction_parameters.channel_type_features = next_channel_type;
Ok(())
}
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.