@@ -1294,7 +1294,7 @@ impl MaybeReadable for Event {
1294
1294
// Note that we do not write a length-prefixed TLV for FundingGenerationReady events.
1295
1295
0u8 => Ok ( None ) ,
1296
1296
1u8 => {
1297
- let f = || {
1297
+ let mut f = || {
1298
1298
let mut payment_hash = PaymentHash ( [ 0 ; 32 ] ) ;
1299
1299
let mut payment_preimage = None ;
1300
1300
let mut payment_secret = None ;
@@ -1342,7 +1342,7 @@ impl MaybeReadable for Event {
1342
1342
f ( )
1343
1343
} ,
1344
1344
2u8 => {
1345
- let f = || {
1345
+ let mut f = || {
1346
1346
let mut payment_preimage = PaymentPreimage ( [ 0 ; 32 ] ) ;
1347
1347
let mut payment_hash = None ;
1348
1348
let mut payment_id = None ;
@@ -1366,7 +1366,7 @@ impl MaybeReadable for Event {
1366
1366
f ( )
1367
1367
} ,
1368
1368
3u8 => {
1369
- let f = || {
1369
+ let mut f = || {
1370
1370
#[ cfg( test) ]
1371
1371
let error_code = Readable :: read ( reader) ?;
1372
1372
#[ cfg( test) ]
@@ -1409,7 +1409,7 @@ impl MaybeReadable for Event {
1409
1409
} ,
1410
1410
4u8 => Ok ( None ) ,
1411
1411
5u8 => {
1412
- let f = || {
1412
+ let mut f = || {
1413
1413
let mut outputs = WithoutLength ( Vec :: new ( ) ) ;
1414
1414
let mut channel_id: Option < ChannelId > = None ;
1415
1415
read_tlv_fields ! ( reader, {
@@ -1445,7 +1445,7 @@ impl MaybeReadable for Event {
1445
1445
} ) )
1446
1446
} ,
1447
1447
7u8 => {
1448
- let f = || {
1448
+ let mut f = || {
1449
1449
let mut prev_channel_id = None ;
1450
1450
let mut next_channel_id = None ;
1451
1451
let mut prev_user_channel_id = None ;
@@ -1473,7 +1473,7 @@ impl MaybeReadable for Event {
1473
1473
f ( )
1474
1474
} ,
1475
1475
9u8 => {
1476
- let f = || {
1476
+ let mut f = || {
1477
1477
let mut channel_id = ChannelId :: new_zero ( ) ;
1478
1478
let mut reason = UpgradableRequired ( None ) ;
1479
1479
let mut user_channel_id_low_opt: Option < u64 > = None ;
@@ -1503,7 +1503,7 @@ impl MaybeReadable for Event {
1503
1503
f ( )
1504
1504
} ,
1505
1505
11u8 => {
1506
- let f = || {
1506
+ let mut f = || {
1507
1507
let mut channel_id = ChannelId :: new_zero ( ) ;
1508
1508
let mut transaction = Transaction { version : 2 , lock_time : LockTime :: ZERO , input : Vec :: new ( ) , output : Vec :: new ( ) } ;
1509
1509
read_tlv_fields ! ( reader, {
@@ -1515,7 +1515,7 @@ impl MaybeReadable for Event {
1515
1515
f ( )
1516
1516
} ,
1517
1517
13u8 => {
1518
- let f = || {
1518
+ let mut f = || {
1519
1519
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1520
1520
( 0 , payment_id, required) ,
1521
1521
( 2 , payment_hash, option) ,
@@ -1531,7 +1531,7 @@ impl MaybeReadable for Event {
1531
1531
f ( )
1532
1532
} ,
1533
1533
15u8 => {
1534
- let f = || {
1534
+ let mut f = || {
1535
1535
let mut payment_hash = PaymentHash ( [ 0 ; 32 ] ) ;
1536
1536
let mut payment_id = PaymentId ( [ 0 ; 32 ] ) ;
1537
1537
let mut reason = None ;
@@ -1553,7 +1553,7 @@ impl MaybeReadable for Event {
1553
1553
Ok ( None )
1554
1554
} ,
1555
1555
19u8 => {
1556
- let f = || {
1556
+ let mut f = || {
1557
1557
let mut payment_hash = PaymentHash ( [ 0 ; 32 ] ) ;
1558
1558
let mut purpose = UpgradableRequired ( None ) ;
1559
1559
let mut amount_msat = 0 ;
@@ -1580,7 +1580,7 @@ impl MaybeReadable for Event {
1580
1580
f ( )
1581
1581
} ,
1582
1582
21u8 => {
1583
- let f = || {
1583
+ let mut f = || {
1584
1584
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1585
1585
( 0 , payment_id, required) ,
1586
1586
( 2 , payment_hash, required) ,
@@ -1596,7 +1596,7 @@ impl MaybeReadable for Event {
1596
1596
f ( )
1597
1597
} ,
1598
1598
23u8 => {
1599
- let f = || {
1599
+ let mut f = || {
1600
1600
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1601
1601
( 0 , payment_id, required) ,
1602
1602
( 2 , payment_hash, required) ,
@@ -1614,7 +1614,7 @@ impl MaybeReadable for Event {
1614
1614
f ( )
1615
1615
} ,
1616
1616
25u8 => {
1617
- let f = || {
1617
+ let mut f = || {
1618
1618
let mut prev_channel_id = ChannelId :: new_zero ( ) ;
1619
1619
let mut failed_next_destination_opt = UpgradableRequired ( None ) ;
1620
1620
read_tlv_fields ! ( reader, {
@@ -1630,7 +1630,7 @@ impl MaybeReadable for Event {
1630
1630
} ,
1631
1631
27u8 => Ok ( None ) ,
1632
1632
29u8 => {
1633
- let f = || {
1633
+ let mut f = || {
1634
1634
let mut channel_id = ChannelId :: new_zero ( ) ;
1635
1635
let mut user_channel_id: u128 = 0 ;
1636
1636
let mut counterparty_node_id = RequiredWrapper ( None ) ;
@@ -1652,7 +1652,7 @@ impl MaybeReadable for Event {
1652
1652
f ( )
1653
1653
} ,
1654
1654
31u8 => {
1655
- let f = || {
1655
+ let mut f = || {
1656
1656
let mut channel_id = ChannelId :: new_zero ( ) ;
1657
1657
let mut user_channel_id: u128 = 0 ;
1658
1658
let mut former_temporary_channel_id = None ;
@@ -1680,7 +1680,7 @@ impl MaybeReadable for Event {
1680
1680
f ( )
1681
1681
} ,
1682
1682
33u8 => {
1683
- let f = || {
1683
+ let mut f = || {
1684
1684
_init_and_read_len_prefixed_tlv_fields ! ( reader, {
1685
1685
( 0 , payment_id, required) ,
1686
1686
} ) ;
0 commit comments