-
Notifications
You must be signed in to change notification settings - Fork 421
[Very Slowly] Start Moving to inline format args #3965
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
[Very Slowly] Start Moving to inline format args #3965
Conversation
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}"/
|
👋 I see @valentinewallace was un-assigned. |
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Since we're cleaning up freshly rustfmt'd code, we might as well also inline format arguments here too.
8d4eb71 to
1e0b75e
Compare
tnull
left a comment
There was a problem hiding this 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_chanOtherwise LGTM
Nevermind, seems I was looking at the branch before the latest force-push. |
There was a problem hiding this 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.
In e2a05a4 we started ignoring
clippy's
uninlined-format-args, but that doesn't mean that clippyis wrong. Here we take the opportunity while doing cleanups to
search+replace a common string in
channelmanager.rswhich coulduse inlined format arguments.