File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6070,7 +6070,7 @@ impl<SP: Deref> FundedChannel<SP> where
6070
6070
require_commitment = true;
6071
6071
match fail_msg {
6072
6072
HTLCFailureMsg::Relay(msg) => {
6073
- htlc.state = InboundHTLCState::LocalRemoved(InboundHTLCRemovalReason::FailRelay((& msg).into()));
6073
+ htlc.state = InboundHTLCState::LocalRemoved(InboundHTLCRemovalReason::FailRelay(msg.clone( ).into()));
6074
6074
update_fail_htlcs.push(msg)
6075
6075
},
6076
6076
HTLCFailureMsg::Malformed(msg) => {
Original file line number Diff line number Diff line change @@ -4440,7 +4440,7 @@ where
4440
4440
HTLCFailureMsg::Relay(msgs::UpdateFailHTLC {
4441
4441
channel_id: msg.channel_id,
4442
4442
htlc_id: msg.htlc_id,
4443
- reason: failure.data.clone() ,
4443
+ reason: failure.data,
4444
4444
})
4445
4445
}
4446
4446
@@ -5824,7 +5824,7 @@ where
5824
5824
let failure = match htlc_fail {
5825
5825
HTLCFailureMsg::Relay(fail_htlc) => HTLCForwardInfo::FailHTLC {
5826
5826
htlc_id: fail_htlc.htlc_id,
5827
- err_packet: (& fail_htlc) .into(),
5827
+ err_packet: fail_htlc.into(),
5828
5828
},
5829
5829
HTLCFailureMsg::Malformed(fail_malformed_htlc) => HTLCForwardInfo::FailMalformedHTLC {
5830
5830
htlc_id: fail_malformed_htlc.htlc_id,
Original file line number Diff line number Diff line change @@ -2355,10 +2355,10 @@ pub(crate) struct OnionErrorPacket {
2355
2355
pub ( crate ) data : Vec < u8 > ,
2356
2356
}
2357
2357
2358
- impl From < & UpdateFailHTLC > for OnionErrorPacket {
2359
- fn from ( msg : & UpdateFailHTLC ) -> Self {
2358
+ impl From < UpdateFailHTLC > for OnionErrorPacket {
2359
+ fn from ( msg : UpdateFailHTLC ) -> Self {
2360
2360
OnionErrorPacket {
2361
- data : msg. reason . clone ( ) ,
2361
+ data : msg. reason ,
2362
2362
}
2363
2363
}
2364
2364
}
You can’t perform that action at this time.
0 commit comments