Skip to content

Commit 8d4eb71

Browse files
committed
Inline further format arguments in forward_intercepted_htlc
Since we're cleaning up freshly rustfmt'd code, we might as well also inline format arguments here too.
1 parent b341f5f commit 8d4eb71

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6035,8 +6035,7 @@ where
60356035
let peer_state_mutex =
60366036
peer_state_lock.get(&next_node_id).ok_or_else(|| APIError::ChannelUnavailable {
60376037
err: format!(
6038-
"Can't find a peer matching the passed counterparty node_id {}",
6039-
next_node_id
6038+
"Can't find a peer matching the passed counterparty node_id {next_node_id}"
60406039
),
60416040
})?;
60426041
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
@@ -6046,10 +6045,7 @@ where
60466045
if let Some(funded_chan) = chan.as_funded() {
60476046
if !funded_chan.context.is_usable() {
60486047
return Err(APIError::ChannelUnavailable {
6049-
err: format!(
6050-
"Channel with id {} not fully established",
6051-
next_hop_channel_id
6052-
),
6048+
err: format!("Channel with id {next_hop_channel_id} not fully established"),
60536049
});
60546050
}
60556051
funded_chan
@@ -6058,23 +6054,23 @@ where
60586054
.unwrap_or(funded_chan.context.outbound_scid_alias())
60596055
} else {
60606056
return Err(APIError::ChannelUnavailable {
6061-
err: format!("Channel with id {} for the passed counterparty node_id {} is still opening.",
6062-
next_hop_channel_id, next_node_id)
6057+
err: format!(
6058+
"Channel with id {next_hop_channel_id} for the passed counterparty node_id {next_node_id} is still opening."
6059+
)
60636060
});
60646061
}
60656062
},
60666063
None => {
60676064
let error = format!(
6068-
"Channel with id {} not found for the passed counterparty node_id {}",
6069-
next_hop_channel_id, next_node_id
6065+
"Channel with id {next_hop_channel_id} not found for the passed counterparty node_id {next_node_id}"
60706066
);
60716067
let logger = WithContext::from(
60726068
&self.logger,
60736069
Some(next_node_id),
60746070
Some(*next_hop_channel_id),
60756071
None,
60766072
);
6077-
log_error!(logger, "{} when attempting to forward intercepted HTLC", error);
6073+
log_error!(logger, "{error} when attempting to forward intercepted HTLC");
60786074
return Err(APIError::ChannelUnavailable { err: error });
60796075
},
60806076
}

0 commit comments

Comments
 (0)