Skip to content

Commit eba18c7

Browse files
committed
Add rustfmt::skip and small adjustments where needed
1 parent 7b56483 commit eba18c7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ impl_writeable_tlv_based_enum!(HTLCFailReasonRepr,
797797
;);
798798

799799
impl HTLCFailReason {
800+
#[rustfmt::skip]
800801
pub(super) fn reason(failure_code: u16, data: Vec<u8>) -> Self {
801802
const BADONION: u16 = 0x8000;
802803
const PERM: u16 = 0x4000;
@@ -1009,11 +1010,14 @@ fn decode_next_hop<T, R: ReadableArgs<T>, N: NextPacketBytes>(shared_secret: [u8
10091010
match R::read(&mut chacha_stream, read_args) {
10101011
Err(err) => {
10111012
let error_code = match err {
1012-
msgs::DecodeError::UnknownVersion => 0x4000 | 1, // unknown realm byte
1013+
// Unknown realm byte
1014+
msgs::DecodeError::UnknownVersion => 0x4000 | 1,
1015+
// invalid_onion_payload
10131016
msgs::DecodeError::UnknownRequiredFeature|
10141017
msgs::DecodeError::InvalidValue|
1015-
msgs::DecodeError::ShortRead => 0x4000 | 22, // invalid_onion_payload
1016-
_ => 0x2000 | 2, // Should never happen
1018+
msgs::DecodeError::ShortRead => 0x4000 | 22,
1019+
// Should never happen
1020+
_ => 0x2000 | 2,
10171021
};
10181022
return Err(OnionDecodeErr::Relay {
10191023
err_msg: "Unable to decode our hop data",

0 commit comments

Comments
 (0)