Destructure reverted (priority leakage fixed)

This commit is contained in:
Per Lindgren 2021-10-20 09:34:59 +02:00
parent 8050304c9d
commit 705b2fd62d

View file

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