about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2014-12-14 22:43:43 -0500
committerJorge Aparicio <japaricious@gmail.com>2014-12-19 10:43:24 -0500
commite0a88a78da2632f615f387a2bdd45777f74f073f (patch)
treed547119f10f8d49e0a7490f9a03eeb2aeaa3e1d5
parentc407785ac0b535dc98e9bf2d9c595111cfff31cc (diff)
liblog: use `#[deriving(Copy)]`
-rw-r--r--src/liblog/lib.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 257ce79b588..2bf9af90271 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.