aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 9d4c31e..db9c647 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -5,6 +5,9 @@ pub enum Error {
Io(std::io::Error),
/// error came from nix::Error
Nix(nix::Error),
+ /// unsplit was called on halves of two different ptys
+ #[cfg(feature = "async")]
+ Unsplit(crate::OwnedReadPty, crate::OwnedWritePty),
}
impl std::fmt::Display for Error {
@@ -12,6 +15,10 @@ impl std::fmt::Display for Error {
match self {
Self::Io(e) => write!(f, "{}", e),
Self::Nix(e) => write!(f, "{}", e),
+ #[cfg(feature = "async")]
+ Self::Unsplit(..) => {
+ write!(f, "unsplit called on halves of two different ptys")
+ }
}
}
}
@@ -33,6 +40,8 @@ impl std::error::Error for Error {
match self {
Self::Io(e) => Some(e),
Self::Nix(e) => Some(e),
+ #[cfg(feature = "async")]
+ Self::Unsplit(..) => None,
}
}
}