diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:20:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:20:35 -0800 |
| commit | 87c3ee861ec488827044e07d5d0cd7c8508c681f (patch) | |
| tree | 49a374a1baf3e3b816120ffdbf28959e10a5ea34 /src/liblog | |
| parent | e4b81d25122b0ff230182375d09300d5403b1750 (diff) | |
| parent | 3cb9fa26ef9905c00a29ea577fb55a12a91c8e7b (diff) | |
| download | rust-87c3ee861ec488827044e07d5d0cd7c8508c681f.tar.gz rust-87c3ee861ec488827044e07d5d0cd7c8508c681f.zip | |
rollup merge of #21457: alexcrichton/issue-21436
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
Diffstat (limited to 'src/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 644f08930cb..4da07c50c59 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -240,21 +240,15 @@ struct DefaultLogger { } /// Wraps the log level with fmt implementations. -#[derive(Copy, PartialEq, PartialOrd)] +#[derive(Copy, PartialEq, PartialOrd, Show)] pub struct LogLevel(pub u32); -impl fmt::Show for LogLevel { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - fmt::String::fmt(self, fmt) - } -} - -impl fmt::String for LogLevel { +impl fmt::Display for LogLevel { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { let LogLevel(level) = *self; match LOG_LEVEL_NAMES.get(level as uint - 1) { - Some(ref name) => fmt::String::fmt(name, fmt), - None => fmt::String::fmt(&level, fmt) + Some(ref name) => fmt::Display::fmt(name, fmt), + None => fmt::Display::fmt(&level, fmt) } } } |
