From 18880406cb425bcd030f0b0aa9e67e8ac05bd852 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 21 Jul 2021 10:14:00 +0200 Subject: [PATCH] use tuple struct syntax for Monotonics everywhere --- book/en/src/migration/migration_v5.md | 4 ++-- examples/smallest.rs | 2 +- examples/spawn.rs | 2 +- examples/spawn2.rs | 2 +- macros/src/tests/single.rs | 2 +- ui/exception-invalid.rs | 2 +- ui/extern-interrupt-not-enough.rs | 2 +- ui/extern-interrupt-used.rs | 2 +- ui/task-priority-too-high.rs | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/book/en/src/migration/migration_v5.md b/book/en/src/migration/migration_v5.md index 154714e354..210063bf5e 100644 --- a/book/en/src/migration/migration_v5.md +++ b/book/en/src/migration/migration_v5.md @@ -226,7 +226,7 @@ v0.6.0 code: fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { let buffer: &'static mut [u8; 1024] = cx.local.buffer; - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } ``` @@ -263,7 +263,7 @@ mod app { fn init(_: init::Context) -> (MySharedResources, MyLocalResources, init::Monotonics) { rtic::pend(Interrupt::UART0); - (MySharedResources, MyLocalResources, init::Monotonics {}) + (MySharedResources, MyLocalResources, init::Monotonics()) } // [more code] diff --git a/examples/smallest.rs b/examples/smallest.rs index 6afcfbd4d0..31750e257a 100644 --- a/examples/smallest.rs +++ b/examples/smallest.rs @@ -16,6 +16,6 @@ mod app { #[init] fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } } diff --git a/examples/spawn.rs b/examples/spawn.rs index bcb4fb235f..435cdf5697 100644 --- a/examples/spawn.rs +++ b/examples/spawn.rs @@ -21,7 +21,7 @@ mod app { fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { foo::spawn(1, 2).unwrap(); - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task()] diff --git a/examples/spawn2.rs b/examples/spawn2.rs index ff9516a6af..ed285b70cf 100644 --- a/examples/spawn2.rs +++ b/examples/spawn2.rs @@ -21,7 +21,7 @@ mod app { fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { foo::spawn(1, 2).unwrap(); - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task] diff --git a/macros/src/tests/single.rs b/macros/src/tests/single.rs index 27118856b7..f20c9ccbb3 100644 --- a/macros/src/tests/single.rs +++ b/macros/src/tests/single.rs @@ -18,7 +18,7 @@ fn analyze() { #[init] fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task(priority = 1)] diff --git a/ui/exception-invalid.rs b/ui/exception-invalid.rs index d899443b9b..07d3c21f54 100644 --- a/ui/exception-invalid.rs +++ b/ui/exception-invalid.rs @@ -10,7 +10,7 @@ mod app { #[init] fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task(binds = NonMaskableInt)] diff --git a/ui/extern-interrupt-not-enough.rs b/ui/extern-interrupt-not-enough.rs index 6e7863475a..1dbe923c98 100644 --- a/ui/extern-interrupt-not-enough.rs +++ b/ui/extern-interrupt-not-enough.rs @@ -10,7 +10,7 @@ mod app { #[init] fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task] diff --git a/ui/extern-interrupt-used.rs b/ui/extern-interrupt-used.rs index a22b85f41b..882d5e3ab0 100644 --- a/ui/extern-interrupt-used.rs +++ b/ui/extern-interrupt-used.rs @@ -10,7 +10,7 @@ mod app { #[init] fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task(binds = UART0)] diff --git a/ui/task-priority-too-high.rs b/ui/task-priority-too-high.rs index 0d903d3a65..46ab561750 100644 --- a/ui/task-priority-too-high.rs +++ b/ui/task-priority-too-high.rs @@ -10,7 +10,7 @@ mod app { #[init] fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) { - (Shared {}, Local {}, init::Monotonics {}) + (Shared {}, Local {}, init::Monotonics()) } #[task(binds = GPIOA, priority = 1)]