From c50e987b4e169e2d7dc7089c91407e1e55c550f1 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Sun, 10 Mar 2019 08:29:23 -0700 Subject: 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. --- src/sys/socket/sockopt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sys/socket/sockopt.rs') diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 5f19e5f3..a9960100 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -173,7 +173,7 @@ macro_rules! sockopt_impl { }; (GetOnly, $name:ident, $level:path, $flag:path, $ty:ty, $getter:ty) => { - #[derive(Copy, Clone, Debug)] + #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct $name; getsockopt_impl!($name, $level, $flag, $ty, $getter); @@ -184,14 +184,14 @@ macro_rules! sockopt_impl { }; (SetOnly, $name:ident, $level:path, $flag:path, $ty:ty, $setter:ty) => { - #[derive(Copy, Clone, Debug)] + #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct $name; setsockopt_impl!($name, $level, $flag, $ty, $setter); }; (Both, $name:ident, $level:path, $flag:path, $ty:ty, $getter:ty, $setter:ty) => { - #[derive(Copy, Clone, Debug)] + #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct $name; setsockopt_impl!($name, $level, $flag, $ty, $setter); -- cgit v1.2.3