From c91737373a5d24ca930ab0fe478e25c575dcd18e Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 12 Feb 2025 14:44:30 -0800 Subject: [PATCH] Fix import in bench for wasm --- library/std/benches/time.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/std/benches/time.rs b/library/std/benches/time.rs index 552481cad92..dfd886738f9 100644 --- a/library/std/benches/time.rs +++ b/library/std/benches/time.rs @@ -1,5 +1,3 @@ -use std::time::Instant; - #[cfg(not(target_arch = "wasm32"))] use test::{Bencher, black_box}; @@ -10,6 +8,7 @@ macro_rules! bench_instant_threaded { fn $bench_name(b: &mut Bencher) -> std::thread::Result<()> { use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; + use std::time::Instant; let running = Arc::new(AtomicBool::new(true));