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:
J. Neuschäfer 2024-07-12 02:03:22 +02:00
parent ed3da1721a
commit 0a19879c5d

View File

@ -70,7 +70,7 @@ pub fn wasm() -> TokenStream {
let executor = ::std::boxed::Box::leak(::std::boxed::Box::new(::embassy_executor::Executor::new()));
executor.start(|spawner| {
spawner.spawn(__embassy_main(spawner)).unwrap();
spawner.must_spawn(__embassy_main(spawner));
});
Ok(())