mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-23 02:40:13 +02:00
Fix import in async.md
This commit is contained in:
parent
abfe08c0e7
commit
46c5a44040
@ -8,6 +8,10 @@ Instead of `tokio::spawn`, `wasm_bindgen` provides `wasm_bindgen_futures::spawn_
|
||||
Let's create a class that waits for messages on a channel to rotate an HTML element:
|
||||
|
||||
```rust
|
||||
use wasm_bindgen::prelude::*;
|
||||
use tokio::sync::mpsc::{Sender, channel};
|
||||
use wasm_bindgen_futures::spawn_local;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum RotateSide {
|
||||
Left,
|
||||
|
Loading…
x
Reference in New Issue
Block a user