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();
}
#[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() {