From 54e8bf4f2e91407be2054cd38fea81ba830303fd Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 6 Aug 2023 18:30:40 -0400 Subject: convert to rustix it seems more maintained, and hopefully this will fix compile issues on macos --- src/error.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 8ed24e2..df515c3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,7 +4,7 @@ pub enum Error { /// error came from std::io::Error Io(std::io::Error), /// error came from nix::Error - Nix(nix::Error), + Rustix(rustix::io::Errno), /// unsplit was called on halves of two different ptys #[cfg(feature = "async")] Unsplit(crate::OwnedReadPty, crate::OwnedWritePty), @@ -14,7 +14,7 @@ impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Io(e) => write!(f, "{e}"), - Self::Nix(e) => write!(f, "{e}"), + Self::Rustix(e) => write!(f, "{e}"), #[cfg(feature = "async")] Self::Unsplit(..) => { write!(f, "unsplit called on halves of two different ptys") @@ -29,9 +29,9 @@ impl std::convert::From for Error { } } -impl std::convert::From for Error { - fn from(e: nix::Error) -> Self { - Self::Nix(e) +impl std::convert::From for Error { + fn from(e: rustix::io::Errno) -> Self { + Self::Rustix(e) } } @@ -39,7 +39,7 @@ impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { Self::Io(e) => Some(e), - Self::Nix(e) => Some(e), + Self::Rustix(e) => Some(e), #[cfg(feature = "async")] Self::Unsplit(..) => None, } -- cgit v1.2.3-54-g00ecf