Skip to content

Commit

Permalink
Fix nightly compiler CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
korken89 committed Feb 23, 2024
1 parent 7a2f605 commit 580ee31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rtic-monotonics/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::Item, GetOneError>;
}

#[cfg(feature = "stm32-metapac")]
impl<T: Iterator> IteratorExt for T {
fn get_one(mut self) -> Result<Self::Item, GetOneError> {
match self.next() {
Expand Down

0 comments on commit 580ee31

Please sign in to comment.