diff --git a/units/src/amount/signed.rs b/units/src/amount/signed.rs index 0ce121425..efe160e71 100644 --- a/units/src/amount/signed.rs +++ b/units/src/amount/signed.rs @@ -318,6 +318,7 @@ impl SignedAmount { /// /// On overflow, panics in debug mode, wraps in release mode. #[must_use] + #[deprecated(since = "TBD", note = "consider converting to u64 using `to_sat`")] pub fn unchecked_add(self, rhs: SignedAmount) -> SignedAmount { Self(self.0 + rhs.0) } /// Unchecked subtraction. @@ -328,6 +329,7 @@ impl SignedAmount { /// /// On overflow, panics in debug mode, wraps in release mode. #[must_use] + #[deprecated(since = "TBD", note = "consider converting to u64 using `to_sat`")] pub fn unchecked_sub(self, rhs: SignedAmount) -> SignedAmount { Self(self.0 - rhs.0) } /// Subtraction that doesn't allow negative [`SignedAmount`]s. diff --git a/units/src/amount/unsigned.rs b/units/src/amount/unsigned.rs index 8fa95eece..cb39301cb 100644 --- a/units/src/amount/unsigned.rs +++ b/units/src/amount/unsigned.rs @@ -394,6 +394,7 @@ impl Amount { /// /// On overflow, panics in debug mode, wraps in release mode. #[must_use] + #[deprecated(since = "TBD", note = "consider converting to u64 using `to_sat`")] pub fn unchecked_add(self, rhs: Amount) -> Amount { Self(self.0 + rhs.0) } /// Unchecked subtraction. @@ -404,6 +405,7 @@ impl Amount { /// /// On overflow, panics in debug mode, wraps in release mode. #[must_use] + #[deprecated(since = "TBD", note = "consider converting to u64 using `to_sat`")] pub fn unchecked_sub(self, rhs: Amount) -> Amount { Self(self.0 - rhs.0) } /// Converts to a signed amount.