summaryrefslogtreecommitdiff
path: root/src/pty.rs
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2019-03-10 08:29:23 -0700
committerBryant Mairs <bryant@mai.rs>2019-06-09 11:31:46 -0700
commitc50e987b4e169e2d7dc7089c91407e1e55c550f1 (patch)
tree4892e791f8809dfa1501e9fa4ff999a106a8dd04 /src/pty.rs
parent2075ac70bdd4848b08213a237feb32f5506096e0 (diff)
downloadnix-c50e987b4e169e2d7dc7089c91407e1e55c550f1.zip
Add extra traits for all types
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all traits are supported by all types, which is why many are missing some.
Diffstat (limited to 'src/pty.rs')
-rw-r--r--src/pty.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pty.rs b/src/pty.rs
index 41bd51b6..db012d81 100644
--- a/src/pty.rs
+++ b/src/pty.rs
@@ -18,8 +18,7 @@ use errno::Errno;
///
/// This is returned by `openpty`. Note that this type does *not* implement `Drop`, so the user
/// must manually close the file descriptors.
-#[derive(Clone, Copy)]
-#[allow(missing_debug_implementations)]
+#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct OpenptyResult {
/// The master port in a virtual pty pair
pub master: RawFd,
@@ -45,7 +44,7 @@ pub struct ForkptyResult {
/// While this datatype is a thin wrapper around `RawFd`, it enforces that the available PTY
/// functions are given the correct file descriptor. Additionally this type implements `Drop`,
/// so that when it's consumed or goes out of scope, it's automatically cleaned-up.
-#[derive(Debug)]
+#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct PtyMaster(RawFd);
impl AsRawFd for PtyMaster {