Lines Matching refs:saturating_mul
96 fn saturating_mul(&self, v: &Self) -> Self; in saturating_mul() method
99 saturating_impl!(SaturatingMul, saturating_mul, u8);
100 saturating_impl!(SaturatingMul, saturating_mul, u16);
101 saturating_impl!(SaturatingMul, saturating_mul, u32);
102 saturating_impl!(SaturatingMul, saturating_mul, u64);
103 saturating_impl!(SaturatingMul, saturating_mul, usize);
105 saturating_impl!(SaturatingMul, saturating_mul, u128);
107 saturating_impl!(SaturatingMul, saturating_mul, i8);
108 saturating_impl!(SaturatingMul, saturating_mul, i16);
109 saturating_impl!(SaturatingMul, saturating_mul, i32);
110 saturating_impl!(SaturatingMul, saturating_mul, i64);
111 saturating_impl!(SaturatingMul, saturating_mul, isize);
113 saturating_impl!(SaturatingMul, saturating_mul, i128);
125 fn saturating_mul<T: SaturatingMul>(a: T, b: T) -> T { in test_saturating_traits() function
126 a.saturating_mul(&b) in test_saturating_traits()
134 assert_eq!(saturating_mul(255, 2), 255u8); in test_saturating_traits()
135 assert_eq!(saturating_mul(127, 2), 127i8); in test_saturating_traits()
136 assert_eq!(saturating_mul(-128, 2), -128i8); in test_saturating_traits()