api test, all implemented, TODO hide priority?

This commit is contained in:
Per Lindgren 2021-10-18 17:39:51 +02:00
parent 05586401c7
commit 713c69e1be
7 changed files with 51 additions and 37 deletions

View file

@ -46,10 +46,12 @@ mod app {
}
// De-structure-ing syntax
// TODO: hide priority field (or re-use priority from first resource)
#[task(shared = [&a, &b, &c])]
fn bar(cx: bar::Context) {
let bar::SharedResources { a, b, c } = cx.shared;
let bar::SharedResources { a, b, c, priority } = cx.shared;
hprintln!("bar: a = {}, b = {}, c = {}", a, b, c).unwrap();
hprintln!("bar: a = {}, b = {}, c = {}, p = {:?}", a, b, c, priority).unwrap();
}
}