aboutsummaryrefslogtreecommitdiff
path: root/examples/cfg.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2020-10-11 19:41:57 +0200
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2020-10-11 20:35:50 +0200
commit5b8e6a22ab68e316e11641dedf5b39e20878c7b7 (patch)
tree1bdc1812ca24203f3b99f381b1e9f8c89f60be24 /examples/cfg.rs
parent524273c96a978299b64e51a9cdcc007585a0f170 (diff)
downloadrtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.tar.gz
rtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.tar.zst
rtic-5b8e6a22ab68e316e11641dedf5b39e20878c7b7.zip
Fixing examples and tests, modules now import user imports correctly
Fmt Correct syntax crate UI test fix Fix build script Cleanup More cleanup
Diffstat (limited to 'examples/cfg.rs')
-rw-r--r--examples/cfg.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/cfg.rs b/examples/cfg.rs
index d49f54c7..c8892eaf 100644
--- a/examples/cfg.rs
+++ b/examples/cfg.rs
@@ -19,10 +19,10 @@ mod app {
count: u32,
}
- #[init(spawn = [foo])]
- fn init(cx: init::Context) -> init::LateResources {
- cx.spawn.foo().unwrap();
- cx.spawn.foo().unwrap();
+ #[init]
+ fn init(_: init::Context) -> init::LateResources {
+ foo::spawn().unwrap();
+ foo::spawn().unwrap();
init::LateResources {}
}
@@ -36,13 +36,13 @@ mod app {
}
}
- #[task(capacity = 2, resources = [count], spawn = [log])]
+ #[task(capacity = 2, resources = [count])]
fn foo(_cx: foo::Context) {
#[cfg(debug_assertions)]
{
*_cx.resources.count += 1;
- _cx.spawn.log(*_cx.resources.count).unwrap();
+ log::spawn(*_cx.resources.count).unwrap();
}
// this wouldn't compile in `release` mode