(self, other: Self)
| 372 | /// Performs checked subtraction |
| 373 | #[inline] |
| 374 | pub fn checked_sub(self, other: Self) -> Option<Self> { |
| 375 | let r = self.wrapping_sub(other); |
| 376 | ((other.is_negative() && r > self) || (!other.is_negative() && r <= self)).then_some(r) |
| 377 | } |
| 378 | |
| 379 | /// Performs wrapping multiplication |
| 380 | #[inline] |