We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a09218f + 36deaed commit 3e0fe12Copy full SHA for 3e0fe12
src/int/mod.rs
@@ -240,11 +240,7 @@ macro_rules! int_impl {
240
}
241
242
fn abs_diff(self, other: Self) -> Self {
243
- if self < other {
244
- other.wrapping_sub(self)
245
- } else {
246
- self.wrapping_sub(other)
247
- }
+ self.abs_diff(other)
248
249
250
int_impl_common!($uty);
@@ -277,7 +273,7 @@ macro_rules! int_impl {
277
273
278
274
279
275
fn abs_diff(self, other: Self) -> $uty {
280
- self.wrapping_sub(other).wrapping_abs() as $uty
276
281
282
283
int_impl_common!($ity);
0 commit comments