diff options
| author | J. Neuschäfer <[email protected]> | 2024-07-12 02:03:22 +0200 |
|---|---|---|
| committer | J. Neuschäfer <[email protected]> | 2024-07-12 02:05:59 +0200 |
| commit | 0a19879c5d73e96b7fd14e3ed452057232e15733 (patch) | |
| tree | 62e1909d615f45c30bede72ce0dca1072befc568 /embassy-executor-macros | |
| parent | ed3da1721a4f704d3f2a8a1cf84d9fc051c71945 (diff) | |
executor: Use spawner.must_spawn(...) for wasm too
All other architectures use must_spawn instead of spawn+unwrap, so use
it for wasm as well.
Diffstat (limited to 'embassy-executor-macros')
| -rw-r--r-- | embassy-executor-macros/src/macros/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-executor-macros/src/macros/main.rs b/embassy-executor-macros/src/macros/main.rs index 088e64d1c..26dfa2397 100644 --- a/embassy-executor-macros/src/macros/main.rs +++ b/embassy-executor-macros/src/macros/main.rs | |||
| @@ -70,7 +70,7 @@ pub fn wasm() -> TokenStream { | |||
| 70 | let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new())); | 70 | let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new())); |
| 71 | 71 | ||
| 72 | executor.start(|spawner| { | 72 | executor.start(|spawner| { |
| 73 | spawner.spawn(__embassy_main(spawner)).unwrap(); | 73 | spawner.must_spawn(__embassy_main(spawner)); |
| 74 | }); | 74 | }); |
| 75 | 75 | ||
| 76 | Ok(()) | 76 | Ok(()) |
