Skip to content

Commit 1e0b75e

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 1e0b75e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 7 additions & 9 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();
@@ -6047,8 +6046,7 @@ where
60476046
if !funded_chan.context.is_usable() {
60486047
return Err(APIError::ChannelUnavailable {
60496048
err: format!(
6050-
"Channel with id {} not fully established",
6051-
next_hop_channel_id
6049+
"Channel with id {next_hop_channel_id} not fully established"
60526050
),
60536051
});
60546052
}
@@ -6058,23 +6056,23 @@ where
60586056
.unwrap_or(funded_chan.context.outbound_scid_alias())
60596057
} else {
60606058
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)
6059+
err: format!(
6060+
"Channel with id {next_hop_channel_id} for the passed counterparty node_id {next_node_id} is still opening."
6061+
)
60636062
});
60646063
}
60656064
},
60666065
None => {
60676066
let error = format!(
6068-
"Channel with id {} not found for the passed counterparty node_id {}",
6069-
next_hop_channel_id, next_node_id
6067+
"Channel with id {next_hop_channel_id} not found for the passed counterparty node_id {next_node_id}"
60706068
);
60716069
let logger = WithContext::from(
60726070
&self.logger,
60736071
Some(next_node_id),
60746072
Some(*next_hop_channel_id),
60756073
None,
60766074
);
6077-
log_error!(logger, "{} when attempting to forward intercepted HTLC", error);
6075+
log_error!(logger, "{error} when attempting to forward intercepted HTLC");
60786076
return Err(APIError::ChannelUnavailable { err: error });
60796077
},
60806078
}

0 commit comments

Comments
 (0)