Skip to content

Commit e2d6a4b

Browse files
committed
Silence new rustc warning about useless muts
1 parent 9d8efec commit e2d6a4b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
//! There are a bunch of these as their handling is relatively error-prone so they are split out
1313
//! here. See also the chanmon_fail_consistency fuzz test.
1414
15+
// Older rustc (which we support) refuses to let us call the get_payment_preimage_hash!() macro
16+
// without the node parameter being mut. This is incorrect, and thus newer rustcs will complain
17+
// about an unnecessary mut. Just silence the warning.
18+
#[allow(unused_mut)]
19+
1520
use chain::transaction::OutPoint;
1621
use ln::channelmanager::{RAACommitmentOrder, PaymentPreimage, PaymentHash, PaymentSecret, PaymentSendFailure};
1722
use ln::channelmonitor::ChannelMonitorUpdateErr;

lightning/src/ln/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ mod channel;
3535
mod onion_utils;
3636
mod wire;
3737

38+
// Older rustc (which we support) refuses to let us call the get_payment_preimage_hash!() macro
39+
// without the node parameter being mut. This is incorrect, and thus newer rustcs will complain
40+
// about an unnecessary mut. Thus, we silence the unused_mut warning in two test modules below.
41+
3842
#[cfg(test)]
3943
#[macro_use]
4044
pub(crate) mod functional_test_utils;
4145
#[cfg(test)]
46+
#[allow(unused_mut)]
4247
mod functional_tests;
4348
#[cfg(test)]
49+
#[allow(unused_mut)]
4450
mod chanmon_update_fail_tests;
4551
#[cfg(test)]
4652
mod reorg_tests;

0 commit comments

Comments
 (0)