(self, rhs: u16)
| 89 | |
| 90 | impl ClampedMul<u16, i16> for u16 { |
| 91 | fn clamped_mul(self, rhs: u16) -> i16 { |
| 92 | let product = u32::from(self) * u32::from(rhs); |
| 93 | if product > i16::MAX as u32 { i16::MAX } else { product as i16 } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | impl ClampedMul<u16, u16> for u16 { |
no outgoing calls
no test coverage detected