liblog: use #[deriving(Copy)]

This commit is contained in:
Jorge Aparicio 2014-12-14 22:43:43 -05:00
parent c407785ac0
commit e0a88a78da

View file

@ -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.