use unsigned_abs instead of abs on signed int to silence clippy

This commit is contained in:
Marijn Schouten 2025-07-03 09:20:57 +00:00
parent f51c9870ba
commit d9505f0b32

View file

@ -2572,7 +2572,7 @@ macro_rules! uint_impl {
if size_of::<Self>() == 1 {
// Trick LLVM into generating the psadbw instruction when SSE2
// is available and this function is autovectorized for u8's.
(self as i32).wrapping_sub(other as i32).abs() as Self
(self as i32).wrapping_sub(other as i32).unsigned_abs() as Self
} else {
if self < other {
other - self