We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff8c7fd + c7fb85a commit fc4d6daCopy full SHA for fc4d6da
Cargo.toml
@@ -20,6 +20,7 @@ maybe-async-cfg = "0.2"
20
21
[features]
22
async = ["dep:embedded-hal-async"]
23
+core-error = [] # bump MSRV to 1.81.0
24
default = ["sync"]
25
defmt-03 = ["dep:defmt"]
26
not-recommended-rfs = []
src/error.rs
@@ -16,3 +16,13 @@ pub enum Error<E> {
16
/// Try to set a Current value without giving the Rfs value
17
UnknownRfs,
18
}
19
+
+#[cfg(feature = "core-error")]
+impl<E: core::fmt::Debug> core::error::Error for Error<E> {}
+impl<E: core::fmt::Debug> core::fmt::Display for Error<E> {
+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ write!(f, "{self:?}")
27
+ }
28
+}
0 commit comments