From 0a19879c5d73e96b7fd14e3ed452057232e15733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Fri, 12 Jul 2024 02:03:22 +0200 Subject: [PATCH 1/2] 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. --- embassy-executor-macros/src/macros/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { 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(()) From de1dc272e03158acd4d319b0a620620fc51418fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Fri, 12 Jul 2024 02:06:09 +0200 Subject: [PATCH 2/2] net-adin1110: Fix typo in comment --- embassy-net-adin1110/src/crc8.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-net-adin1110/src/crc8.rs b/embassy-net-adin1110/src/crc8.rs index 7d20a7401..321983e64 100644 --- a/embassy-net-adin1110/src/crc8.rs +++ b/embassy-net-adin1110/src/crc8.rs @@ -16,7 +16,7 @@ const CRC8X_TABLE: [u8; 256] = [ 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3, ]; -/// Calculate the crc of a pease of data. +/// Calculate the crc of a piece of data. pub fn crc8(data: &[u8]) -> u8 { data.iter().fold(0, |crc, &byte| CRC8X_TABLE[usize::from(byte ^ crc)]) }