From 2f897e210950242f9855403b056af0e74276e2ab Mon Sep 17 00:00:00 2001 From: yancy Date: Sat, 8 Mar 2025 10:36:56 -0600 Subject: [PATCH] Remove warning section Since monadic handling has been introduced, panics have been replaced with return errors. Therefore this section is no longer applicable. --- units/src/amount/unsigned.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/units/src/amount/unsigned.rs b/units/src/amount/unsigned.rs index c52a8f2c5..89d7eb35f 100644 --- a/units/src/amount/unsigned.rs +++ b/units/src/amount/unsigned.rs @@ -22,17 +22,6 @@ use super::{ /// conversion to various denominations. The [`Amount`] type does not implement [`serde`] traits /// but we do provide modules for serializing as satoshis or bitcoin. /// -/// Warning! -/// -/// This type implements several arithmetic operations from [`core::ops`]. -/// To prevent errors due to overflow or underflow when using these operations, -/// it is advised to instead use the checked arithmetic methods whose names -/// start with `checked_`. The operations from [`core::ops`] that [`Amount`] -/// implements will panic when overflow or underflow occurs. Also note that -/// since the internal representation of amounts is unsigned, subtracting below -/// zero is considered an underflow and will cause a panic if you're not using -/// the checked arithmetic methods. -/// /// # Examples /// /// ```