From bfabea94e9082a9d329a03458831e7dcf5324ab8 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 1 Feb 2024 12:32:42 +1100 Subject: [PATCH] Remove unwrap comment Add an issue and remove the TODO from the code. ref: https://github.com/rust-bitcoin/rust-bitcoin/issues/2426 --- units/src/amount.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/units/src/amount.rs b/units/src/amount.rs index 1045038d..2981e067 100644 --- a/units/src/amount.rs +++ b/units/src/amount.rs @@ -716,7 +716,6 @@ impl Amount { /// The function panics if the argument multiplied by the number of sats /// per bitcoin overflows a u64 type. pub const fn from_int_btc(btc: u64) -> Amount { - // TODO replace whith unwrap() when available in const context. match btc.checked_mul(100_000_000) { Some(amount) => Amount::from_sat(amount), None => {