aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-07-12 15:52:22 +0000
committerGitHub <[email protected]>2024-07-12 15:52:22 +0000
commit3937c53fd84b1616a6ed40bcf486e74acc7e6635 (patch)
treec27b933a468dd7140a66946576c67ac384da3df9
parented3da1721a4f704d3f2a8a1cf84d9fc051c71945 (diff)
parentde1dc272e03158acd4d319b0a620620fc51418fa (diff)
Merge pull request #3170 from neuschaefer/dev
Minor fixes
-rw-r--r--embassy-executor-macros/src/macros/main.rs2
-rw-r--r--embassy-net-adin1110/src/crc8.rs2
2 files changed, 2 insertions, 2 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(())
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] = [
16 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3, 16 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3,
17]; 17];
18 18
19/// Calculate the crc of a pease of data. 19/// Calculate the crc of a piece of data.
20pub fn crc8(data: &[u8]) -> u8 { 20pub fn crc8(data: &[u8]) -> u8 {
21 data.iter().fold(0, |crc, &byte| CRC8X_TABLE[usize::from(byte ^ crc)]) 21 data.iter().fold(0, |crc, &byte| CRC8X_TABLE[usize::from(byte ^ crc)])
22} 22}