Fix nightly compiler CI failure

This commit is contained in:
Emil Fresk 2024-02-23 08:20:21 +01:00
parent 7a2f605b52
commit 8b2465ba37
2 changed files with 4 additions and 1 deletions

View file

@ -158,15 +158,18 @@ fn stm32() {
fs::write(out_file, g.to_string()).unwrap(); fs::write(out_file, g.to_string()).unwrap();
} }
#[cfg(feature = "stm32-metapac")]
enum GetOneError { enum GetOneError {
None, None,
Multiple, Multiple,
} }
#[cfg(feature = "stm32-metapac")]
trait IteratorExt: Iterator { trait IteratorExt: Iterator {
fn get_one(self) -> Result<Self::Item, GetOneError>; fn get_one(self) -> Result<Self::Item, GetOneError>;
} }
#[cfg(feature = "stm32-metapac")]
impl<T: Iterator> IteratorExt for T { impl<T: Iterator> IteratorExt for T {
fn get_one(mut self) -> Result<Self::Item, GetOneError> { fn get_one(mut self) -> Result<Self::Item, GetOneError> {
match self.next() { match self.next() {

View file

@ -9,7 +9,7 @@ mod app {
struct Local {} struct Local {}
#[init] #[init]
fn init(cx: init::Context) -> (Shared, Local) { fn init(_cx: init::Context) -> (Shared, Local) {
(Shared {}, Local {}) (Shared {}, Local {})
} }
} }