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.
abs
1 parent 0cedc03 commit 0938132Copy full SHA for 0938132
core/src/num/uint_macros.rs
@@ -2572,7 +2572,7 @@ macro_rules! uint_impl {
2572
if size_of::<Self>() == 1 {
2573
// Trick LLVM into generating the psadbw instruction when SSE2
2574
// is available and this function is autovectorized for u8's.
2575
- (self as i32).wrapping_sub(other as i32).abs() as Self
+ (self as i32).wrapping_sub(other as i32).unsigned_abs() as Self
2576
} else {
2577
if self < other {
2578
other - self
0 commit comments