Lines Matching refs:saturating_sub
12 fn saturating_sub(self, v: Self) -> Self; in saturating_sub() method
24 fn saturating_sub(self, v: Self) -> Self {
25 Self::saturating_sub(self, v)
73 fn saturating_sub(&self, v: &Self) -> Self; in saturating_sub() method
76 saturating_impl!(SaturatingSub, saturating_sub, u8);
77 saturating_impl!(SaturatingSub, saturating_sub, u16);
78 saturating_impl!(SaturatingSub, saturating_sub, u32);
79 saturating_impl!(SaturatingSub, saturating_sub, u64);
80 saturating_impl!(SaturatingSub, saturating_sub, usize);
82 saturating_impl!(SaturatingSub, saturating_sub, u128);
84 saturating_impl!(SaturatingSub, saturating_sub, i8);
85 saturating_impl!(SaturatingSub, saturating_sub, i16);
86 saturating_impl!(SaturatingSub, saturating_sub, i32);
87 saturating_impl!(SaturatingSub, saturating_sub, i64);
88 saturating_impl!(SaturatingSub, saturating_sub, isize);
90 saturating_impl!(SaturatingSub, saturating_sub, i128);
122 fn saturating_sub<T: SaturatingSub>(a: T, b: T) -> T { in test_saturating_traits() function
123 a.saturating_sub(&b) in test_saturating_traits()
131 assert_eq!(saturating_sub(0, 1), 0u8); in test_saturating_traits()
132 assert_eq!(saturating_sub(-128, 1), -128i8); in test_saturating_traits()
133 assert_eq!(saturating_sub(127, -1), 127i8); in test_saturating_traits()