What changed, and why it matters
This commit is a routine code cleanup that fixes style warnings reported by the Clippy linter. It replaces three uses of `format!("static string")` with the equivalent `"static string".to_string()`. There is no functional change, no bug fix, and no security relevance.
No security action needed. Treat as normal maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies lightning-liquidity/src/lsps1/service.rs only. It changes three error-message constructions from format!("...") to "...".to_string(). Both produce an identical String value; the change merely satisfies the clippy::useless_format lint. No logic, control flow, or data handling changes.
Changed components
lightning-liquidity/src/lsps1/service.rsInspect captured patch +4 / −3
diff --git a/lightning-liquidity/src/lsps1/service.rs b/lightning-liquidity/src/lsps1/service.rs
index e81213c..c4a678d 100644
--- a/lightning-liquidity/src/lsps1/service.rs
+++ b/lightning-liquidity/src/lsps1/service.rs
@@ -291,7 +291,7 @@ where
if !is_valid(¶ms.order, &self.config.supported_options) {
let response = LSPS1Response::CreateOrderError(LSPSResponseError {
code: LSPS1_CREATE_ORDER_REQUEST_ORDER_MISMATCH_ERROR_CODE,
- message: format!("Order does not match options supported by LSP server"),
+ message: "Order does not match options supported by LSP server".to_string(),
data: Some(format!("Supported options are {:?}", &self.config.supported_options)),
});
let msg = LSPS1Message::Response(request_id, response).into();
@@ -509,7 +509,8 @@ where
let order = peer_state_lock.get_order(¶ms.order_id).map_err(|e| {
let response = LSPS1Response::GetOrderError(LSPSResponseError {
code: LSPS1_GET_ORDER_REQUEST_ORDER_NOT_FOUND_ERROR_CODE,
- message: format!("Order with the requested order_id has not been found."),
+ message: "Order with the requested order_id has not been found."
+ .to_string(),
data: None,
});
let msg = LSPS1Message::Response(request_id.clone(), response).into();
@@ -534,7 +535,7 @@ where
None => {
let response = LSPS1Response::GetOrderError(LSPSResponseError {
code: LSPS1_GET_ORDER_REQUEST_ORDER_NOT_FOUND_ERROR_CODE,
- message: format!("Order with the requested order_id has not been found."),
+ message: "Order with the requested order_id has not been found.".to_string(),
data: None,
});
let msg = LSPS1Message::Response(request_id, response).into();
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.