ソースを参照

Merge pull request #485 from qiujiangkun/add_std_error_error

impl std::error::Error for smoltcp::Error
Dario Nieuwenhuis 3 年 前
コミット
a874ed1183
1 ファイル変更3 行追加0 行削除
  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>;