diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-09 01:49:31 +0200 |
|---|---|---|
| committer | diondokter <[email protected]> | 2025-08-29 13:23:21 +0200 |
| commit | 8aec341f28a00012e1771d5c35d2647e11830755 (patch) | |
| tree | 28ec3bad05e5dcb6ec949493688111839bb6865b /examples/nrf52840/src/bin/pubsub.rs | |
| parent | 34ff67cdbf25e278ff99bd4a05b6b8c6a30fa5d1 (diff) | |
executor: return error when creating the spawntoken, not when spawning.
Diffstat (limited to 'examples/nrf52840/src/bin/pubsub.rs')
| -rw-r--r-- | examples/nrf52840/src/bin/pubsub.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/nrf52840/src/bin/pubsub.rs b/examples/nrf52840/src/bin/pubsub.rs index 5ebea9220..c0392b18c 100644 --- a/examples/nrf52840/src/bin/pubsub.rs +++ b/examples/nrf52840/src/bin/pubsub.rs | |||
| @@ -26,9 +26,9 @@ async fn main(spawner: Spawner) { | |||
| 26 | // It's good to set up the subscribers before publishing anything. | 26 | // It's good to set up the subscribers before publishing anything. |
| 27 | // A subscriber will only yield messages that have been published after its creation. | 27 | // A subscriber will only yield messages that have been published after its creation. |
| 28 | 28 | ||
| 29 | spawner.must_spawn(fast_logger(unwrap!(MESSAGE_BUS.subscriber()))); | 29 | spawner.spawn(fast_logger(unwrap!(MESSAGE_BUS.subscriber())).unwrap()); |
| 30 | spawner.must_spawn(slow_logger(unwrap!(MESSAGE_BUS.dyn_subscriber()))); | 30 | spawner.spawn(slow_logger(unwrap!(MESSAGE_BUS.dyn_subscriber())).unwrap()); |
| 31 | spawner.must_spawn(slow_logger_pure(unwrap!(MESSAGE_BUS.dyn_subscriber()))); | 31 | spawner.spawn(slow_logger_pure(unwrap!(MESSAGE_BUS.dyn_subscriber())).unwrap()); |
| 32 | 32 | ||
| 33 | // Get a publisher | 33 | // Get a publisher |
| 34 | let message_publisher = unwrap!(MESSAGE_BUS.publisher()); | 34 | let message_publisher = unwrap!(MESSAGE_BUS.publisher()); |
