Skip to content

Commit

Permalink
Update tokio/src/runtime/coop.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Taiki Endo <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu and taiki-e committed Jul 25, 2023
1 parent 4be9109 commit 9d35ca2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tokio/src/runtime/coop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,14 @@ cfg_coop! {
mod test {
use super::*;

cfg_is_wasm_not_wasi! {
use wasm_bindgen_test::wasm_bindgen_test as test;
}

#[cfg(not(all(target_family = "wasm", not(target_os = "wasi"))))]
use std::prelude::v1::test;
#[cfg(all(target_family = "wasm", not(target_os = "wasi")))]
use wasm_bindgen_test::wasm_bindgen_test as test;

fn get() -> Budget {
context::budget(|cell| cell.get()).unwrap_or(Budget::unconstrained())
}

#[self::test]
#[test]
fn budgeting() {
use futures::future::poll_fn;
use tokio_test::*;
Expand Down

0 comments on commit 9d35ca2

Please sign in to comment.