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:
parent
9ea3e29d61
commit
278229def5
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue