@@ -771,11 +771,11 @@ macro_rules! gpio {
771
771
for $PXi<Output <OpenDrain >>
772
772
{
773
773
type Error = Never ;
774
- fn into_input_pin( self ) -> Result <Self , Self :: Error > {
774
+ fn into_input_pin( self ) -> Result <Self , Never > {
775
775
Ok ( self )
776
776
}
777
- fn into_output_pin( mut self , state: PinState ) -> Result <Self , Self :: Error > {
778
- self . set_state( state) ? ;
777
+ fn into_output_pin( mut self , state: PinState ) -> Result <Self , Never > {
778
+ self . set_state( state) . unwrap ( ) ; // Infallible
779
779
Ok ( self )
780
780
}
781
781
}
@@ -784,11 +784,11 @@ macro_rules! gpio {
784
784
for $PXi<Output <PushPull >>
785
785
{
786
786
type Error = Never ;
787
- fn into_input_pin( self ) -> Result <$PXi<Input <Floating >>, Self :: Error > {
787
+ fn into_input_pin( self ) -> Result <$PXi<Input <Floating >>, Never > {
788
788
Ok ( self . into_floating_input( ) )
789
789
}
790
- fn into_output_pin( mut self , state: PinState ) -> Result <Self , Self :: Error > {
791
- self . set_state( state) ? ;
790
+ fn into_output_pin( mut self , state: PinState ) -> Result <Self , Never > {
791
+ self . set_state( state) . unwrap ( ) ; // Infallible
792
792
Ok ( self )
793
793
}
794
794
}
@@ -797,12 +797,12 @@ macro_rules! gpio {
797
797
for $PXi<Input <Floating >>
798
798
{
799
799
type Error = Never ;
800
- fn into_input_pin( self ) -> Result <Self , Self :: Error > {
800
+ fn into_input_pin( self ) -> Result <Self , Never > {
801
801
Ok ( self )
802
802
}
803
- fn into_output_pin( self , state: PinState ) -> Result <$PXi<Output <PushPull >>, Self :: Error > {
803
+ fn into_output_pin( self , state: PinState ) -> Result <$PXi<Output <PushPull >>, Never > {
804
804
let mut pin = self . into_push_pull_output( ) ;
805
- pin. set_state( state) ? ;
805
+ pin. set_state( state) . unwrap ( ) ; // Infallible
806
806
Ok ( pin)
807
807
}
808
808
}
0 commit comments