From a76526add6d4c5a9ea4deb631e0d2ffd7900b3b7 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 3 Sep 2021 17:17:02 +0200 Subject: [PATCH] rp: remove use of never type --- embassy-rp/src/gpio.rs | 5 +++-- embassy-rp/src/lib.rs | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index 4ea78016a..585e9861e 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs @@ -1,3 +1,4 @@ +use core::convert::Infallible; use core::marker::PhantomData; use crate::pac; @@ -81,7 +82,7 @@ impl<'d, T: Pin> Drop for Input<'d, T> { } impl<'d, T: Pin> digital::InputPin for Input<'d, T> { - type Error = !; + type Error = Infallible; fn is_high(&self) -> Result { Ok(self.is_high()) @@ -151,7 +152,7 @@ impl<'d, T: Pin> Drop for Output<'d, T> { } impl<'d, T: Pin> digital::OutputPin for Output<'d, T> { - type Error = !; + type Error = Infallible; /// Set the output as high. fn set_high(&mut self) -> Result<(), Self::Error> { diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index 93dbb9cca..b98d181b5 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -2,7 +2,6 @@ #![feature(generic_associated_types)] #![feature(asm)] #![feature(type_alias_impl_trait)] -#![feature(never_type)] #[cfg(feature = "unstable-pac")] pub use rp2040_pac2 as pac;