From 8aec341f28a00012e1771d5c35d2647e11830755 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 9 Jul 2025 01:49:31 +0200 Subject: executor: return error when creating the spawntoken, not when spawning. --- examples/rp/src/bin/sharing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/rp/src/bin/sharing.rs') diff --git a/examples/rp/src/bin/sharing.rs b/examples/rp/src/bin/sharing.rs index 856be6ace..d4c89946b 100644 --- a/examples/rp/src/bin/sharing.rs +++ b/examples/rp/src/bin/sharing.rs @@ -68,7 +68,7 @@ fn main() -> ! { // High-priority executor: runs in interrupt mode interrupt::SWI_IRQ_0.set_priority(Priority::P3); let spawner = EXECUTOR_HI.start(interrupt::SWI_IRQ_0); - spawner.must_spawn(task_a(uart)); + spawner.spawn(task_a(uart).unwrap()); // Low priority executor: runs in thread mode let executor = EXECUTOR_LOW.init(Executor::new()); @@ -83,8 +83,8 @@ fn main() -> ! { static REF_CELL: ConstStaticCell> = ConstStaticCell::new(RefCell::new(MyType { inner: 0 })); let ref_cell = REF_CELL.take(); - spawner.must_spawn(task_b(uart, cell, ref_cell)); - spawner.must_spawn(task_c(cell, ref_cell)); + spawner.spawn(task_b(uart, cell, ref_cell).unwrap()); + spawner.spawn(task_c(cell, ref_cell).unwrap()); }); } -- cgit