diff --git a/rtic-monotonics/build.rs b/rtic-monotonics/build.rs index 50a3660a24..21ccce9f51 100644 --- a/rtic-monotonics/build.rs +++ b/rtic-monotonics/build.rs @@ -158,15 +158,18 @@ fn stm32() { fs::write(out_file, g.to_string()).unwrap(); } +#[cfg(feature = "stm32-metapac")] enum GetOneError { None, Multiple, } +#[cfg(feature = "stm32-metapac")] trait IteratorExt: Iterator { fn get_one(self) -> Result; } +#[cfg(feature = "stm32-metapac")] impl IteratorExt for T { fn get_one(mut self) -> Result { match self.next() { diff --git a/rtic/ui/unknown-interrupt.rs b/rtic/ui/unknown-interrupt.rs index 3c6c69f8f3..146001229c 100644 --- a/rtic/ui/unknown-interrupt.rs +++ b/rtic/ui/unknown-interrupt.rs @@ -9,7 +9,7 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local) { + fn init(_cx: init::Context) -> (Shared, Local) { (Shared {}, Local {}) } }