mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 03:57:24 +00:00
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:
parent
b75f65855c
commit
b74d8df552
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue