Skip to content

Commit 640a87e

Browse files
committed
Use Infallible error type instead ()
1 parent a5c0e3c commit 640a87e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/digital/v2_compat.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
//! ```
3333
//!
3434
35+
use core::convert::Infallible;
36+
3537
#[allow(deprecated)]
3638
use super::v1;
3739
use super::v2;
@@ -42,8 +44,7 @@ impl <T> v2::OutputPin for T
4244
where
4345
T: v1::OutputPin,
4446
{
45-
// TODO: update to ! when never_type is stabilized
46-
type Error = ();
47+
type Error = Infallible;
4748

4849
fn set_low(&mut self) -> Result<(), Self::Error> {
4950
Ok(self.set_low())
@@ -81,8 +82,7 @@ impl <T> v2::InputPin for T
8182
where
8283
T: v1::InputPin
8384
{
84-
// TODO: update to ! when never_type is stabilized
85-
type Error = ();
85+
type Error = Infallible;
8686

8787
fn is_low(&self) -> Result<bool, Self::Error> {
8888
Ok(self.is_low())

0 commit comments

Comments
 (0)