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:
Tobin C. Harding 2024-02-01 12:37:53 +11:00
parent 3e83ef9276
commit c69caafefc
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 2 additions and 6 deletions

View File

@ -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)

View File

@ -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)