diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-09-03 17:17:02 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-09-03 17:17:02 +0200 |
| commit | a76526add6d4c5a9ea4deb631e0d2ffd7900b3b7 (patch) | |
| tree | bf4f7e22938af336b40429d1b8567d02af11d0a0 | |
| parent | 11d2b0cdc194b0570e3dd9028c2a979598ab2df7 (diff) | |
rp: remove use of never type
| -rw-r--r-- | embassy-rp/src/gpio.rs | 5 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | use core::convert::Infallible; | ||
| 1 | use core::marker::PhantomData; | 2 | use core::marker::PhantomData; |
| 2 | 3 | ||
| 3 | use crate::pac; | 4 | use crate::pac; |
| @@ -81,7 +82,7 @@ impl<'d, T: Pin> Drop for Input<'d, T> { | |||
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | impl<'d, T: Pin> digital::InputPin for Input<'d, T> { | 84 | impl<'d, T: Pin> digital::InputPin for Input<'d, T> { |
| 84 | type Error = !; | 85 | type Error = Infallible; |
| 85 | 86 | ||
| 86 | fn is_high(&self) -> Result<bool, Self::Error> { | 87 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 87 | Ok(self.is_high()) | 88 | Ok(self.is_high()) |
| @@ -151,7 +152,7 @@ impl<'d, T: Pin> Drop for Output<'d, T> { | |||
| 151 | } | 152 | } |
| 152 | 153 | ||
| 153 | impl<'d, T: Pin> digital::OutputPin for Output<'d, T> { | 154 | impl<'d, T: Pin> digital::OutputPin for Output<'d, T> { |
| 154 | type Error = !; | 155 | type Error = Infallible; |
| 155 | 156 | ||
| 156 | /// Set the output as high. | 157 | /// Set the output as high. |
| 157 | fn set_high(&mut self) -> Result<(), Self::Error> { | 158 | 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 @@ | |||
| 2 | #![feature(generic_associated_types)] | 2 | #![feature(generic_associated_types)] |
| 3 | #![feature(asm)] | 3 | #![feature(asm)] |
| 4 | #![feature(type_alias_impl_trait)] | 4 | #![feature(type_alias_impl_trait)] |
| 5 | #![feature(never_type)] | ||
| 6 | 5 | ||
| 7 | #[cfg(feature = "unstable-pac")] | 6 | #[cfg(feature = "unstable-pac")] |
| 8 | pub use rp2040_pac2 as pac; | 7 | pub use rp2040_pac2 as pac; |
