liblog: use #[deriving(Copy)]
This commit is contained in:
parent
c407785ac0
commit
e0a88a78da
1 changed files with 2 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue