Skip to content

Commit c3a1ffb

Browse files
committed
Don't req a clone-able ChannelManager in LSPS2ServiceHandler
`LSPS2ServiceHandler` currently requires that the `Deref` to a `ChannelManager` be `Clone`, but doesn't use it for anything. This upsets the bindings somewhat as they generate a wrapper struct which implements `Deref` (as it holds a pointer) but does not implement `Clone` (as the inner object cannot be cloned. Thus, we simply remove the additional bound here.
1 parent 0cf6aca commit c3a1ffb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning-liquidity/src/lsps2/service.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ macro_rules! get_or_insert_peer_state_entry {
554554
}
555555

556556
/// The main object allowing to send and receive bLIP-52 / LSPS2 messages.
557-
pub struct LSPS2ServiceHandler<CM: Deref + Clone>
557+
pub struct LSPS2ServiceHandler<CM: Deref>
558558
where
559559
CM::Target: AChannelManager,
560560
{
@@ -568,7 +568,7 @@ where
568568
config: LSPS2ServiceConfig,
569569
}
570570

571-
impl<CM: Deref + Clone> LSPS2ServiceHandler<CM>
571+
impl<CM: Deref> LSPS2ServiceHandler<CM>
572572
where
573573
CM::Target: AChannelManager,
574574
{
@@ -1355,7 +1355,7 @@ where
13551355
}
13561356
}
13571357

1358-
impl<CM: Deref + Clone> LSPSProtocolMessageHandler for LSPS2ServiceHandler<CM>
1358+
impl<CM: Deref> LSPSProtocolMessageHandler for LSPS2ServiceHandler<CM>
13591359
where
13601360
CM::Target: AChannelManager,
13611361
{

0 commit comments

Comments
 (0)