Change Infallible error type to unit error type
@@ -63,7 +63,6 @@ use crate::target::P0;
use crate::target::{ P1 };
use crate::hal::digital::v2::{OutputPin, StatefulOutputPin, InputPin};
-use core::convert::Infallible;
impl<MODE> Pin<MODE> {
/// Convert the pin to be a floating input
@@ -221,7 +220,7 @@ impl<MODE> Pin<MODE> {
}
impl<MODE> InputPin for Pin<Input<MODE>> {
- type Error = Infallible;
+ type Error = ();
fn is_high(&self) -> Result<bool, Self::Error> {
self.is_low().map(|v| !v)
@@ -240,7 +239,7 @@ impl<MODE> InputPin for Pin<Input<MODE>> {
}
impl<MODE> OutputPin for Pin<Output<MODE>> {
- type Error = Infallible;
+ type Error = ();
/// Set the output as high
fn set_high(&mut self) -> Result<(), Self::Error> {
