Skip to content

Commit

Permalink
fix wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Jan 11, 2023
1 parent 623f4dc commit aeb2259
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tokio/tests/sync_broadcast.rs
Expand Up @@ -2,7 +2,7 @@
#![warn(rust_2018_idioms)]
#![cfg(feature = "sync")]

#[cfg(tokio_wasm_not_wasi)]
#[cfg(any(not(tokio_wasm), tokio_wasi))]
use wasm_bindgen_test::wasm_bindgen_test as test;

use tokio::sync::broadcast;
Expand All @@ -11,6 +11,7 @@ use tokio_test::{
assert_err, assert_ok, assert_pending, assert_ready, assert_ready_err, assert_ready_ok,
};

#[cfg(tokio_wasm_not_wasi)]
use rand::Rng;
use std::sync::Arc;

Expand Down Expand Up @@ -563,6 +564,7 @@ fn sender_len() {
}

#[test]
#[cfg(any(not(tokio_wasm), tokio_wasi))]
fn sender_len_random() {
let (tx, mut rx1) = broadcast::channel(16);
let mut rx2 = tx.subscribe();
Expand Down

0 comments on commit aeb2259

Please sign in to comment.