Add allow for out of bounds indexing

Out of bounds indexing is a workaround for const panic until MSRV +1.57
This commit is contained in:
yancy 2023-12-31 21:32:25 +01:00
parent 9ea3e29d61
commit 278229def5
2 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,8 @@ impl Weight {
#[allow(unconditional_panic)] #[allow(unconditional_panic)]
// disabling this lint until panic!() can be used. // disabling this lint until panic!() can be used.
#[allow(clippy::let_unit_value)] #[allow(clippy::let_unit_value)]
// disabling this lint until panic!() can be used.
#[allow(clippy::out_of_bounds_indexing)]
let _int_overflow_scaling_weight = [(); 0][1]; let _int_overflow_scaling_weight = [(); 0][1];
Weight(0) Weight(0)
} }

View File

@ -594,6 +594,8 @@ impl Amount {
#[allow(unconditional_panic)] #[allow(unconditional_panic)]
// disabling this lint until panic!() can be used. // disabling this lint until panic!() can be used.
#[allow(clippy::let_unit_value)] #[allow(clippy::let_unit_value)]
// disabling this lint until panic!() can be used.
#[allow(clippy::out_of_bounds_indexing)]
let _int_overflow_converting_btc_to_sats = [(); 0][1]; let _int_overflow_converting_btc_to_sats = [(); 0][1];
Amount(0) Amount(0)
} }