From d12d34fc39f62487d971fb7970aa343e4a3d0d8b Mon Sep 17 00:00:00 2001 From: = <=> Date: Sat, 16 Dec 2023 14:15:17 -0600 Subject: [PATCH] fix tests on other archs --- tokio/tests/coop_budget.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio/tests/coop_budget.rs b/tokio/tests/coop_budget.rs index 05b5c117692..0c4cc7e6497 100644 --- a/tokio/tests/coop_budget.rs +++ b/tokio/tests/coop_budget.rs @@ -1,7 +1,7 @@ #![warn(rust_2018_idioms)] #![cfg(all(feature = "full", target_os = "linux"))] -use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use tokio::net::UdpSocket; @@ -23,8 +23,8 @@ use tokio::net::UdpSocket; /// and there are two budget events per packet, a send and a recv. #[tokio::test] async fn coop_budget_udp_send_recv() { - const BUDGET: u64 = 128; - const N_ITERATIONS: u64 = 1024; + const BUDGET: usize = 128; + const N_ITERATIONS: usize = 1024; const PACKET: &[u8] = b"Hello, world"; const PACKET_LEN: usize = 12; @@ -42,7 +42,7 @@ async fn coop_budget_udp_send_recv() { tx.connect(rx.local_addr().unwrap()).await.unwrap(); rx.connect(tx.local_addr().unwrap()).await.unwrap(); - let tracker = Arc::new(AtomicU64::default()); + let tracker = Arc::new(AtomicUsize::default()); let tracker_clone = Arc::clone(&tracker);