Skip to content

Commit 48bcc0c

Browse files
careyk007hannobraun
authored andcommitted
Change Infallible error type to unit error type
1 parent 882a554 commit 48bcc0c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nrf52-hal-common/src/gpio.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ use crate::target::P0;
6363
use crate::target::{ P1 };
6464

6565
use crate::hal::digital::v2::{OutputPin, StatefulOutputPin, InputPin};
66-
use core::convert::Infallible;
6766

6867
impl<MODE> Pin<MODE> {
6968
/// Convert the pin to be a floating input
@@ -221,7 +220,7 @@ impl<MODE> Pin<MODE> {
221220
}
222221

223222
impl<MODE> InputPin for Pin<Input<MODE>> {
224-
type Error = Infallible;
223+
type Error = ();
225224

226225
fn is_high(&self) -> Result<bool, Self::Error> {
227226
self.is_low().map(|v| !v)
@@ -240,7 +239,7 @@ impl<MODE> InputPin for Pin<Input<MODE>> {
240239
}
241240

242241
impl<MODE> OutputPin for Pin<Output<MODE>> {
243-
type Error = Infallible;
242+
type Error = ();
244243

245244
/// Set the output as high
246245
fn set_high(&mut self) -> Result<(), Self::Error> {

0 commit comments

Comments
 (0)