diff options
author | 2023-01-11 21:33:44 +0100 | |
---|---|---|
committer | 2023-01-11 21:33:44 +0100 | |
commit | 1fe587c5160b9e99bbb67644318cb9e5c9c56b4e (patch) | |
tree | 226bb5664329af932c9444cdc1b8134dcfd3c929 /examples/task.rs | |
parent | 67cccbd4819c4d874780a6b388d7f10c1c8031b2 (diff) | |
download | rtic-1fe587c5160b9e99bbb67644318cb9e5c9c56b4e.tar.gz rtic-1fe587c5160b9e99bbb67644318cb9e5c9c56b4e.tar.zst rtic-1fe587c5160b9e99bbb67644318cb9e5c9c56b4e.zip |
Remove unwrap() from hprintln!()
sd 'hprintln(.*).unwrap\(\)' 'hprintln' (fd -e rs .)
Diffstat (limited to 'examples/task.rs')
-rw-r--r-- | examples/task.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/task.rs b/examples/task.rs index 2c53aa23..d24fca62 100644 --- a/examples/task.rs +++ b/examples/task.rs @@ -26,31 +26,31 @@ mod app { #[task] fn foo(_: foo::Context) { - hprintln!("foo - start").unwrap(); + hprintln!("foo - start"); // spawns `bar` onto the task scheduler // `foo` and `bar` have the same priority so `bar` will not run until // after `foo` terminates bar::spawn().unwrap(); - hprintln!("foo - middle").unwrap(); + hprintln!("foo - middle"); // spawns `baz` onto the task scheduler // `baz` has higher priority than `foo` so it immediately preempts `foo` baz::spawn().unwrap(); - hprintln!("foo - end").unwrap(); + hprintln!("foo - end"); } #[task] fn bar(_: bar::Context) { - hprintln!("bar").unwrap(); + hprintln!("bar"); debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator } #[task(priority = 2)] fn baz(_: baz::Context) { - hprintln!("baz").unwrap(); + hprintln!("baz"); } } |