diff options
Diffstat (limited to 'examples/async-task-multiple-prios.rs')
-rw-r--r-- | examples/async-task-multiple-prios.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/examples/async-task-multiple-prios.rs b/examples/async-task-multiple-prios.rs index 2f3a0f7b..f614820c 100644 --- a/examples/async-task-multiple-prios.rs +++ b/examples/async-task-multiple-prios.rs @@ -24,8 +24,8 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local) { - hprintln!("init").unwrap(); + fn init(_: init::Context) -> (Shared, Local) { + hprintln!("init"); async_task1::spawn().ok(); async_task2::spawn().ok(); @@ -51,8 +51,7 @@ mod app { *a += 1; *a }) - ) - .ok(); + ); } #[task(priority = 1, shared = [a, b])] @@ -63,8 +62,7 @@ mod app { *a += 1; *a }) - ) - .ok(); + ); } #[task(priority = 2, shared = [a, b])] @@ -75,8 +73,7 @@ mod app { *a += 1; *a }) - ) - .ok(); + ); } #[task(priority = 2, shared = [a, b])] @@ -87,7 +84,6 @@ mod app { *a += 1; *a }) - ) - .ok(); + ); } } |