Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

In e2a05a4 we started ignoring
clippy's uninlined-format-args, but that doesn't mean that clippy
is wrong. Here we take the opportunity while doing cleanups to
search+replace a common string in channelmanager.rs which could
use inlined format arguments.

In e2a05a4 we started ignoring
clippy's `uninlined-format-args`, but that doesn't mean that clippy
is wrong. Here we take the opportunity while doing cleanups to
search+replace a common string in `channelmanager.rs` which could
use inlined format arguments.

This is the result of running the following replacement:
s/Can't find a peer matching the passed counterparty node_id {}", counterparty_node_id/Can't find a peer matching the passed counterparty node_id {counterparty_node_id}"/
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jul 28, 2025

👋 I see @valentinewallace was un-assigned.
If you'd like another reviewer assignment, please click here.

@codecov
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 39.02439% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.93%. Comparing base (ed42300) to head (1e0b75e).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/ln/channelmanager.rs 39.02% 24 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3965      +/-   ##
==========================================
- Coverage   88.94%   88.93%   -0.01%     
==========================================
  Files         173      174       +1     
  Lines      123876   123869       -7     
  Branches   123876   123869       -7     
==========================================
- Hits       110177   110161      -16     
- Misses      11248    11256       +8     
- Partials     2451     2452       +1     
Flag Coverage Δ
fuzzing 22.18% <0.00%> (+<0.01%) ⬆️
tests 88.76% <39.02%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Since we're cleaning up freshly rustfmt'd code, we might as well
also inline format arguments here too.
@TheBlueMatt TheBlueMatt force-pushed the 2025-07-inline-format branch from 8d4eb71 to 1e0b75e Compare July 28, 2025 12:07
@tnull tnull self-requested a review July 28, 2025 13:15
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a run of rustfmt:

diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 7fe43b915..2214676ce 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -6045,7 +6045,9 @@ where
                                        if let Some(funded_chan) = chan.as_funded() {
                                                if !funded_chan.context.is_usable() {
                                                        return Err(APIError::ChannelUnavailable {
-                                                               err: format!("Channel with id {next_hop_channel_id} not fully established"),
+                                                               err: format!(
+                                                                       "Channel with id {next_hop_channel_id} not fully established"
+                                                               ),
                                                        });
                                                }
                                                funded_chan

Otherwise LGTM

@tnull tnull removed the request for review from valentinewallace July 28, 2025 13:18
@tnull
Copy link
Contributor

tnull commented Jul 28, 2025

This needs a run of rustfmt:

Nevermind, seems I was looking at the branch before the latest force-push.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will land, as it's trivial.

@tnull tnull merged commit 7e31b3e into lightningdevkit:main Jul 28, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants