We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5c0e3c commit 640a87eCopy full SHA for 640a87e
src/digital/v2_compat.rs
@@ -32,6 +32,8 @@
32
//! ```
33
//!
34
35
+use core::convert::Infallible;
36
+
37
#[allow(deprecated)]
38
use super::v1;
39
use super::v2;
@@ -42,8 +44,7 @@ impl <T> v2::OutputPin for T
42
44
where
43
45
T: v1::OutputPin,
46
{
- // TODO: update to ! when never_type is stabilized
- type Error = ();
47
+ type Error = Infallible;
48
49
fn set_low(&mut self) -> Result<(), Self::Error> {
50
Ok(self.set_low())
@@ -81,8 +82,7 @@ impl <T> v2::InputPin for T
81
82
83
T: v1::InputPin
84
85
86
87
fn is_low(&self) -> Result<bool, Self::Error> {
88
Ok(self.is_low())
0 commit comments