io_uring: use unsigned_abs() for isize -> usize

Fixes a new clippy lint:
<https://rust-lang.github.io/rust-clippy/master/index.html#cast_abs_to_unsigned>

We still need the cast to u32, since the other parts of the expression are
u32.

BUG=b:243677117
TEST=tools/clippy # with Rust 1.62

Change-Id: Ifb6176f310f3cc7377410c251142a0f062a1ddd4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3854969
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Daniel Verkamp 2022-08-23 16:35:46 -07:00 committed by crosvm LUCI
parent b75f65855c
commit b74d8df552

View file

@ -1598,7 +1598,7 @@ mod tests {
// wake up the completer threads may still be in the completion ring.
assert!(uring.complete_ring.num_ready() <= NUM_COMPLETERS as u32);
assert_eq!(
in_flight.lock().abs() as u32 + uring.complete_ring.num_ready(),
in_flight.lock().unsigned_abs() as u32 + uring.complete_ring.num_ready(),
NUM_COMPLETERS as u32
);
assert_eq!(uring.submit_ring.lock().added, 0);