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.
This commit is contained in:
parent
ed3da1721a
commit
0a19879c5d
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ pub fn wasm() -> TokenStream {
|
||||||
let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new()));
|
let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new()));
|
||||||
|
|
||||||
executor.start(|spawner| {
|
executor.start(|spawner| {
|
||||||
spawner.spawn(__embassy_main(spawner)).unwrap();
|
spawner.must_spawn(__embassy_main(spawner));
|
||||||
});
|
});
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue