Quellcode durchsuchen

add std::error::Error to smoltcp::Error

qiujiangkun vor 3 Jahren
Ursprung
Commit
52d8802069
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      src/lib.rs

+ 3 - 0
src/lib.rs

@@ -160,6 +160,9 @@ pub enum Error {
     Dropped,
 }
 
+#[cfg(feature = "std")]
+impl std::error::Error for Error {}
+
 /// The result type for the networking stack.
 pub type Result<T> = core::result::Result<T, Error>;