Skip to content

Commit b099cb2

Browse files
committed
f Address lints
1 parent be3cc40 commit b099cb2

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

lightning-liquidity/src/lsps0/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) const JSONRPC_ERROR_FIELD_KEY: &str = "error";
4141
pub(crate) const JSONRPC_INVALID_MESSAGE_ERROR_CODE: i32 = -32700;
4242
pub(crate) const JSONRPC_INVALID_MESSAGE_ERROR_MESSAGE: &str = "parse error";
4343

44-
pub(crate) const _LSPS0_CLIENT_REJECTED_ERROR_CODE: i32 = 001;
44+
pub(crate) const _LSPS0_CLIENT_REJECTED_ERROR_CODE: i32 = 1;
4545

4646
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
4747
pub(crate) enum LSPSMethod {

lightning-liquidity/src/lsps2/client.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::events::{Event, EventQueue};
1313
use crate::lsps0::ser::{ProtocolMessageHandler, RequestId, ResponseError};
1414
use crate::lsps2::event::LSPS2ClientEvent;
1515
use crate::message_queue::MessageQueue;
16-
use crate::prelude::{HashMap, HashSet, String};
16+
use crate::prelude::{HashMap, HashSet, String, ToString};
1717
use crate::sync::{Arc, Mutex, RwLock};
1818

1919
use lightning::ln::msgs::{ErrorAction, LightningError};
@@ -174,7 +174,8 @@ where
174174
.is_some()
175175
{
176176
return Err(APIError::APIMisuseError {
177-
err: format!("Failed due to duplicate request_id. This should never happen!"),
177+
err: "Failed due to duplicate request_id. This should never happen!"
178+
.to_string(),
178179
});
179180
}
180181
}

lightning-liquidity/src/lsps2/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl OutboundJITChannelState {
145145
debug_assert_eq!(num_htlcs, 1);
146146
if num_htlcs != 1 {
147147
return Err(ChannelStateError(
148-
format!("Paying via multiple HTLCs is disallowed in \"no-MPP+var-invoice\" mode.")
148+
"Paying via multiple HTLCs is disallowed in \"no-MPP+var-invoice\" mode.".to_string()
149149
));
150150
}
151151
(total_expected_outbound_amount_msat, false)

lightning-liquidity/src/manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ where
547547
.filter_map(|(public_key, msg)| {
548548
serde_json::to_string(&msg)
549549
.ok()
550-
.and_then(|payload| Some((public_key, RawLSPSMessage { payload })))
550+
.map(|payload| (public_key, RawLSPSMessage { payload }))
551551
})
552552
.collect()
553553
}

0 commit comments

Comments
 (0)