From e0a88a78da2632f615f387a2bdd45777f74f073f Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 14 Dec 2014 22:43:43 -0500 Subject: [PATCH] liblog: use `#[deriving(Copy)]` --- src/liblog/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 257ce79b5889..2bf9af902718 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -232,11 +232,9 @@ struct DefaultLogger { } /// Wraps the log level with fmt implementations. -#[deriving(PartialEq, PartialOrd)] +#[deriving(Copy, PartialEq, PartialOrd)] pub struct LogLevel(pub u32); -impl Copy for LogLevel {} - impl fmt::Show for LogLevel { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { let LogLevel(level) = *self; @@ -341,14 +339,13 @@ pub struct LogRecord<'a> { } #[doc(hidden)] +#[deriving(Copy)] pub struct LogLocation { pub module_path: &'static str, pub file: &'static str, pub line: uint, } -impl Copy for LogLocation {} - /// Tests whether a given module's name is enabled for a particular level of /// logging. This is the second layer of defense about determining whether a /// module's log statement should be emitted or not.