From 0ef1244bd7aaf7ec175d3aac4f2254f77ecae309 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Fri, 23 Feb 2024 10:34:48 +0100 Subject: [PATCH] Impl From for syscall Error. --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fa4c37d427..80de88ed3b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,6 +88,12 @@ pub mod error { } } } + #[cfg(feature = "redox_syscall")] + impl From for syscall::Error { + fn from(value: Error) -> Self { + Self::new(value.errno()) + } + } #[cfg(feature = "std")] impl From for std::io::Error { fn from(value: Error) -> Self {