From 1d5f1295443a5ebc2ed63dd368996d13845d07c6 Mon Sep 17 00:00:00 2001 From: Viktor Sonesten Date: Wed, 21 Apr 2021 15:33:50 +0200 Subject: [PATCH] book/migration/v5: update init signature, fix example syntax The example now migrates from v5 to v6 instead of an incorrect v6 syntax to a another incorrect v6 syntax. --- book/en/src/migration/migration_v5.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/en/src/migration/migration_v5.md b/book/en/src/migration/migration_v5.md index 8edefd2dfb..04cb20e699 100644 --- a/book/en/src/migration/migration_v5.md +++ b/book/en/src/migration/migration_v5.md @@ -71,14 +71,14 @@ From this: ``` rust #[rtic::app(device = lm3s6965)] -mod app { +const APP: () = { #[init] fn init(_: init::Context) { rtic::pend(Interrupt::UART0); } // [more code] -} +}; ``` to this: @@ -87,10 +87,10 @@ to this: #[rtic::app(device = lm3s6965)] mod app { #[init] - fn init(_: init::Context) -> init::LateResources { + fn init(_: init::Context) -> (init::LateResources, init::Monotonics) { rtic::pend(Interrupt::UART0); - init::LateResources {} + (init::LateResources {}, init::Monotonics()) } // [more code]