aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Per Lindgren <per.lindgren@ltu.se> 2023-01-07 14:16:24 +0100
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2023-03-01 00:31:08 +0100
commitbd20d0d89e3ea477c9970f06f0ec750cee71690b (patch)
tree364f80ad5d2078bfed0692b17883536d54ad0502
parentb9b3ded5e21c40256163cf85f4fba2991c03a45c (diff)
downloadrtic-bd20d0d89e3ea477c9970f06f0ec750cee71690b.tar.gz
rtic-bd20d0d89e3ea477c9970f06f0ec750cee71690b.tar.zst
rtic-bd20d0d89e3ea477c9970f06f0ec750cee71690b.zip
examples/locals fixed
Diffstat (limited to '')
-rw-r--r--examples/locals.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/locals.rs b/examples/locals.rs
index aa5d0fee..a35b4c92 100644
--- a/examples/locals.rs
+++ b/examples/locals.rs
@@ -1,5 +1,6 @@
//! examples/locals.rs
+#![feature(type_alias_impl_trait)]
#![deny(unsafe_code)]
#![deny(warnings)]
#![no_main]
@@ -23,7 +24,7 @@ mod app {
// `#[init]` cannot access locals from the `#[local]` struct as they are initialized here.
#[init]
- fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
+ fn init(_: init::Context) -> (Shared, Local) {
foo::spawn().unwrap();
bar::spawn().unwrap();
@@ -35,7 +36,6 @@ mod app {
local_to_bar: 0,
local_to_idle: 0,
},
- init::Monotonics(),
)
}
@@ -62,7 +62,7 @@ mod app {
// `local_to_foo` can only be accessed from this context
#[task(local = [local_to_foo])]
- fn foo(cx: foo::Context) {
+ async fn foo(cx: foo::Context) {
let local_to_foo = cx.local.local_to_foo;
*local_to_foo += 1;
@@ -74,7 +74,7 @@ mod app {
// `local_to_bar` can only be accessed from this context
#[task(local = [local_to_bar])]
- fn bar(cx: bar::Context) {
+ async fn bar(cx: bar::Context) {
let local_to_bar = cx.local.local_to_bar;
*local_to_bar += 1;