Skip to content

Commit 2e1f950

Browse files
jhprattgitbot
authored and
gitbot
committed
Rollup merge of rust-lang#136949 - ehuss:wasm-bench-time, r=jhpratt
Fix import in bench for wasm This import was causing annoying unused import errors when checking the standard library for some wasm targets. The problem is that everything here is disabled if it is wasm32, but this import wasn't cfg'd.
2 parents 71b6555 + 7e227b9 commit 2e1f950

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

std/benches/time.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::time::Instant;
2-
31
#[cfg(not(target_arch = "wasm32"))]
42
use test::{Bencher, black_box};
53

@@ -10,6 +8,7 @@ macro_rules! bench_instant_threaded {
108
fn $bench_name(b: &mut Bencher) -> std::thread::Result<()> {
119
use std::sync::Arc;
1210
use std::sync::atomic::{AtomicBool, Ordering};
11+
use std::time::Instant;
1312

1413
let running = Arc::new(AtomicBool::new(true));
1514

0 commit comments

Comments
 (0)