]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove unnecessary destructure
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 21 Oct 2024 17:15:24 +0000 (12:15 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 5 Nov 2024 00:00:22 +0000 (18:00 -0600)
lightning/src/offers/invoice.rs

index 92b75baafbff67964a361b957c1020a9fc470773..0dfe49cec9f9c662be2cb8aecfb683d754669651 100644 (file)
@@ -1274,12 +1274,7 @@ impl TryFrom<Vec<u8>> for UnsignedBolt12Invoice {
        fn try_from(bytes: Vec<u8>) -> Result<Self, Self::Error> {
                let invoice = ParsedMessage::<PartialInvoiceTlvStream>::try_from(bytes)?;
                let ParsedMessage { mut bytes, tlv_stream } = invoice;
-               let (
-                       payer_tlv_stream, offer_tlv_stream, invoice_request_tlv_stream, invoice_tlv_stream,
-               ) = tlv_stream;
-               let contents = InvoiceContents::try_from(
-                       (payer_tlv_stream, offer_tlv_stream, invoice_request_tlv_stream, invoice_tlv_stream)
-               )?;
+               let contents = InvoiceContents::try_from(tlv_stream)?;
 
                let tagged_hash = TaggedHash::from_valid_tlv_stream_bytes(SIGNATURE_TAG, &bytes);