Use Result instead of Option for Frame creation.

This commit is contained in:
Corey Schuhen
2024-03-12 21:19:06 +10:00
parent 12a3af5043
commit 242759a600
9 changed files with 78 additions and 100 deletions

View File

@@ -46,7 +46,7 @@ async fn main(_spawner: Spawner) {
let mut i: u8 = 0;
loop {
let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), &[i, 0, 1, 2, 3, 4, 5, 6]);
let tx_frame = Frame::new_data(unwrap!(StandardId::new(i as _)), &[i, 0, 1, 2, 3, 4, 5, 6]).unwrap();
can.write(&tx_frame).await;
match can.read().await {