aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs12
1 files changed, 6 insertions, 6 deletions
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<std::io::Error> for Error {
}
}
-impl std::convert::From<nix::Error> for Error {
- fn from(e: nix::Error) -> Self {
- Self::Nix(e)
+impl std::convert::From<rustix::io::Errno> 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,
}