From: Matt Corallo Date: Thu, 10 Sep 2020 20:32:45 +0000 (-0400) Subject: Silence new rustc warning about useless muts X-Git-Tag: v0.0.12~31^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=25b0c2a475ab109ee457df1a0cd92ce2389c8573;p=rust-lightning Silence new rustc warning about useless muts --- diff --git a/lightning/src/ln/mod.rs b/lightning/src/ln/mod.rs index 1062df9a..b0c0283c 100644 --- a/lightning/src/ln/mod.rs +++ b/lightning/src/ln/mod.rs @@ -35,12 +35,18 @@ mod channel; mod onion_utils; mod wire; +// Older rustc (which we support) refuses to let us call the get_payment_preimage_hash!() macro +// without the node parameter being mut. This is incorrect, and thus newer rustcs will complain +// about an unnecessary mut. Thus, we silence the unused_mut warning in two test modules below. + #[cfg(test)] #[macro_use] pub(crate) mod functional_test_utils; #[cfg(test)] +#[allow(unused_mut)] mod functional_tests; #[cfg(test)] +#[allow(unused_mut)] mod chanmon_update_fail_tests; #[cfg(test)] mod reorg_tests;