What changed, and why it matters
This commit is a minor code cleanup that changes how two error messages are formatted in Rust. It uses a newer, more concise syntax for embedding variables inside strings. There is no functional change and no security relevance.
No action needed; this is a non-functional style refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch inlines format arguments in two format! macro calls within lightning/src/ln/channelmanager.rs, replacing positional/argument-style formatting with inline variable capture (e.g., {peer_node_id}). This is a syntactic refactor with no change to program logic, output values, or security behavior.
Changed components
lightning/src/ln/channelmanager.rsInspect captured patch +2 / −4
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index f2419b2..f2e8fa7 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -4514,8 +4514,7 @@ where
let peer_state_mutex =
per_peer_state.get(peer_node_id).ok_or_else(|| APIError::ChannelUnavailable {
err: format!(
- "Can't find a peer matching the passed counterparty node_id {}",
- peer_node_id
+ "Can't find a peer matching the passed counterparty node_id {peer_node_id}",
),
})?;
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
@@ -4563,8 +4562,7 @@ where
} else {
Err(APIError::ChannelUnavailable {
err: format!(
- "Channel with id {} not found for the passed counterparty node_id {}",
- channel_id, peer_node_id
+ "Channel with id {channel_id} not found for the passed counterparty node_id {peer_node_id}",
),
})
}
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.