mirror of
https://github.com/rust-lang/log.git
synced 2026-03-09 07:14:07 +00:00
keep error messages in sync
This commit is contained in:
parent
c7531e8253
commit
d2e7afef39
10
src/lib.rs
10
src/lib.rs
@ -793,8 +793,8 @@ pub struct SetLoggerError(());
|
||||
|
||||
impl fmt::Display for SetLoggerError {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "attempted to set a logger after the logging system \
|
||||
was already initialized")
|
||||
use error::Error;
|
||||
fmt.write_str(self.description())
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,7 +813,8 @@ pub struct ShutdownLoggerError(());
|
||||
|
||||
impl fmt::Display for ShutdownLoggerError {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "attempted to shut down the logger without an active logger")
|
||||
use error::Error;
|
||||
fmt.write_str(self.description())
|
||||
}
|
||||
}
|
||||
|
||||
@ -830,7 +831,8 @@ pub struct LevelParseError(());
|
||||
|
||||
impl fmt::Display for LevelParseError {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "attempted to convert a string that doesn't match an existing log level")
|
||||
use error::Error;
|
||||
fmt.write_str(self.description())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user