Remove unwrap comment

Add an issue and remove the TODO from the code.

ref: https://github.com/rust-bitcoin/rust-bitcoin/issues/2426
This commit is contained in:
Tobin C. Harding 2024-02-01 12:32:42 +11:00
parent 8bdaf4a34d
commit bfabea94e9
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 0 additions and 1 deletions

View File

@ -716,7 +716,6 @@ impl Amount {
/// The function panics if the argument multiplied by the number of sats /// The function panics if the argument multiplied by the number of sats
/// per bitcoin overflows a u64 type. /// per bitcoin overflows a u64 type.
pub const fn from_int_btc(btc: u64) -> Amount { 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) { match btc.checked_mul(100_000_000) {
Some(amount) => Amount::from_sat(amount), Some(amount) => Amount::from_sat(amount),
None => { None => {