Skip to content

Commit

Permalink
Fixed error in LogLevel's implementation of Display trait.
Browse files Browse the repository at this point in the history
  • Loading branch information
dousamichal0807 committed Apr 20, 2022
1 parent 85925da commit 6af4e43
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ impl LogLevel {

impl Display for LogLevel {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
writeln!(f, "{}",
match self {
Self::Debug => "DEBUG",
Self::Info => "INFO",
Self::Warning => "WARN",
Self::Error => "ERROR",
Self::Fatal => "FATAL",
}
)
write!(f, "{}", match self {
Self::Debug => "DEBUG",
Self::Info => "INFO",
Self::Warning => "WARN",
Self::Error => "ERROR",
Self::Fatal => "FATAL",
})
}
}

Expand Down

0 comments on commit 6af4e43

Please sign in to comment.