From 30080a0b3fc3eb300648107770d015474ecf32c3 Mon Sep 17 00:00:00 2001 From: rascul Date: Fri, 15 Mar 2024 21:06:10 -0500 Subject: [PATCH] add support for std::io::Error --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 9f19e95..cf87b86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,15 @@ impl From> for Rear { } } +impl From for Rear { + fn from(error: std::io::Error) -> Self { + Self { + message: error.to_string(), + error: error.into(), + } + } +} + #[cfg(feature = "serde_json")] impl From for Rear { fn from(error: serde_json::Error) -> Self {