We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 81f2dc6 + e9782ce commit 145dbc4Copy full SHA for 145dbc4
src/math/support/int_traits.rs
@@ -184,7 +184,7 @@ macro_rules! int_impl {
184
}
185
186
fn abs_diff(self, other: Self) -> Self {
187
- if self < other { other.wrapping_sub(self) } else { self.wrapping_sub(other) }
+ self.abs_diff(other)
188
189
190
int_impl_common!($uty);
@@ -221,7 +221,7 @@ macro_rules! int_impl {
221
222
223
fn abs_diff(self, other: Self) -> $uty {
224
- self.wrapping_sub(other).wrapping_abs() as $uty
225
226
227
int_impl_common!($ity);
0 commit comments