From 89c922079eaefc748febdb62aeccfff598a07c69 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 12 Feb 2019 15:08:46 +0100 Subject: update examples and tests --- tests/cpass/late-not-send.rs | 6 ++++-- tests/cpass/late-resource.rs | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/cpass') diff --git a/tests/cpass/late-not-send.rs b/tests/cpass/late-not-send.rs index 06d376b..5b278ab 100644 --- a/tests/cpass/late-not-send.rs +++ b/tests/cpass/late-not-send.rs @@ -19,10 +19,12 @@ const APP: () = { static mut Y: Option = None; #[init(resources = [Y])] - fn init() { + fn init() -> init::LateResources { *resources.Y = Some(NotSend { _0: PhantomData }); - X = NotSend { _0: PhantomData }; + init::LateResources { + X: NotSend { _0: PhantomData }, + } } #[idle(resources = [X, Y])] diff --git a/tests/cpass/late-resource.rs b/tests/cpass/late-resource.rs index 94ec8c9..0dec4cb 100644 --- a/tests/cpass/late-resource.rs +++ b/tests/cpass/late-resource.rs @@ -14,8 +14,7 @@ const APP: () = { static Y: u32 = (); #[init] - fn init() { - X = 0; - Y = 1; + fn init() -> init::LateResources { + init::LateResources { X: 0, Y: 1 } } }; -- cgit v1.2.3