From 0ec3f1f2821fd7e978cbeb9a8931814b7fd3b29d Mon Sep 17 00:00:00 2001 From: Aaron Weiss Date: Sun, 14 Dec 2014 19:21:14 -0500 Subject: [PATCH] Updated to using #[deriving(Copy)]. --- src/data/command.rs | 2 +- src/data/response.rs | 4 +--- src/data/user.rs | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/data/command.rs b/src/data/command.rs index da94b03..097c749 100644 --- a/src/data/command.rs +++ b/src/data/command.rs @@ -948,7 +948,7 @@ impl<'a> Command<'a> { /// A list of all of the subcommands for the capabilities extension. #[stable] -#[deriving(Show, PartialEq)] +#[deriving(Copy, Show, PartialEq)] pub enum CapSubCommand { /// Requests a list of the server's capabilities. LS, diff --git a/src/data/response.rs b/src/data/response.rs index b9de0cb..287786c 100644 --- a/src/data/response.rs +++ b/src/data/response.rs @@ -6,7 +6,7 @@ use data::message::Message; /// List of all server responses as defined in [RFC 2812](http://tools.ietf.org/html/rfc2812). /// All commands are documented with their expected form from the RFC. -#[deriving(Show, PartialEq, FromPrimitive)] +#[deriving(Copy, Show, PartialEq, FromPrimitive)] #[repr(uint)] #[unstable] pub enum Response { @@ -306,8 +306,6 @@ impl Response { } } -impl Copy for Response {} - impl FromStr for Response { fn from_str(s: &str) -> Option { if let Some(respcode) = from_str(s) { diff --git a/src/data/user.rs b/src/data/user.rs index f1be64a..c862f25 100644 --- a/src/data/user.rs +++ b/src/data/user.rs @@ -107,7 +107,7 @@ impl PartialEq for User { /// The user's access level. #[stable] -#[deriving(PartialEq, Clone, Show)] +#[deriving(Copy, PartialEq, Clone, Show)] pub enum AccessLevel { /// The channel owner (~). Owner, @@ -123,8 +123,6 @@ pub enum AccessLevel { Member, } -impl Copy for AccessLevel {} - impl PartialOrd for AccessLevel { fn partial_cmp(&self, other: &AccessLevel) -> Option { if self == other { return Some(Equal) }