Skip to content

Commit

Permalink
Fix example inclusion (#11)
Browse files Browse the repository at this point in the history
According to

https://doc.rust-lang.org/reference/conditional-compilation.html#target_family

`target_arch="wasm"` doesn't exist, but `target_family="wasm"` does.

Co-authored-by: WhizSid <whizsid@aol.com>
  • Loading branch information
ineiti and whizsid authored Oct 11, 2024
1 parent 6dcc3ca commit ce39d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ replicate above APIs. Users only have to change their `use` scripts by
using a `cfg` macro.

```rust
#[cfg(not(target_arch="wasm"))]
#[cfg(not(target_family="wasm"))]
use tokio::time::*;
#[cfg(target_arch="wasm")]
#[cfg(target_family="wasm")]
use wasmtimer::tokio::*;
```

Expand Down

0 comments on commit ce39d06

Please sign in to comment.