diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-29 21:58:35 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-29 23:40:36 +0200 |
| commit | a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch) | |
| tree | e60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /examples/wasm/src | |
| parent | 8745d646f0976791b7098456aa61adb983fb1c18 (diff) | |
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'examples/wasm/src')
| -rw-r--r-- | examples/wasm/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/wasm/src/lib.rs b/examples/wasm/src/lib.rs index 61757ebd7..2e961e65a 100644 --- a/examples/wasm/src/lib.rs +++ b/examples/wasm/src/lib.rs | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #![feature(type_alias_impl_trait)] | 1 | #![feature(type_alias_impl_trait)] |
| 2 | #![allow(incomplete_features)] | 2 | #![allow(incomplete_features)] |
| 3 | 3 | ||
| 4 | use embassy::executor::Spawner; | 4 | use embassy_executor::executor::Spawner; |
| 5 | use embassy::time::{Duration, Timer}; | 5 | use embassy_executor::time::{Duration, Timer}; |
| 6 | 6 | ||
| 7 | #[embassy::task] | 7 | #[embassy_executor::task] |
| 8 | async fn ticker() { | 8 | async fn ticker() { |
| 9 | let window = web_sys::window().expect("no global `window` exists"); | 9 | let window = web_sys::window().expect("no global `window` exists"); |
| 10 | 10 | ||
| @@ -24,7 +24,7 @@ async fn ticker() { | |||
| 24 | } | 24 | } |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | #[embassy::main] | 27 | #[embassy_executor::main] |
| 28 | async fn main(spawner: Spawner) { | 28 | async fn main(spawner: Spawner) { |
| 29 | wasm_logger::init(wasm_logger::Config::default()); | 29 | wasm_logger::init(wasm_logger::Config::default()); |
| 30 | spawner.spawn(ticker()).unwrap(); | 30 | spawner.spawn(ticker()).unwrap(); |
