Remove attribute comments
Add an issue and remove the TODO from the code as well as the attribute comments, leave a single comment as an explanation of why the unusual code block. ref: https://github.com/rust-bitcoin/rust-bitcoin/issues/2427
This commit is contained in:
parent
3e83ef9276
commit
c69caafefc
|
@ -63,11 +63,9 @@ impl Weight {
|
||||||
match vb.checked_mul(Self::WITNESS_SCALE_FACTOR) {
|
match vb.checked_mul(Self::WITNESS_SCALE_FACTOR) {
|
||||||
Some(weight) => Weight(weight),
|
Some(weight) => Weight(weight),
|
||||||
None => {
|
None => {
|
||||||
// TODO replace with panic!() when MSRV = 1.57+
|
// When MSRV is 1.57+ we can use `panic!()`.
|
||||||
#[allow(unconditional_panic)]
|
#[allow(unconditional_panic)]
|
||||||
// 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)]
|
#[allow(clippy::out_of_bounds_indexing)]
|
||||||
let _int_overflow_scaling_weight = [(); 0][1];
|
let _int_overflow_scaling_weight = [(); 0][1];
|
||||||
Weight(0)
|
Weight(0)
|
||||||
|
|
|
@ -719,11 +719,9 @@ impl Amount {
|
||||||
match btc.checked_mul(100_000_000) {
|
match btc.checked_mul(100_000_000) {
|
||||||
Some(amount) => Amount::from_sat(amount),
|
Some(amount) => Amount::from_sat(amount),
|
||||||
None => {
|
None => {
|
||||||
// TODO replace with panic!() when MSRV = 1.57+
|
// When MSRV is 1.57+ we can use `panic!()`.
|
||||||
#[allow(unconditional_panic)]
|
#[allow(unconditional_panic)]
|
||||||
// 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)]
|
#[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