mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-23 10:50:18 +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:
|
Let's create a class that waits for messages on a channel to rotate an HTML element:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
use wasm_bindgen::prelude::*;
|
||||||
|
use tokio::sync::mpsc::{Sender, channel};
|
||||||
|
use wasm_bindgen_futures::spawn_local;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum RotateSide {
|
enum RotateSide {
|
||||||
Left,
|
Left,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user