idk why this isn't in master yet #94

Merged
cscherrNT merged 79 commits from devel into master 2024-07-22 13:30:20 +02:00
1 changed files with 10 additions and 2 deletions
Showing only changes of commit c81952002f - Show all commits

View File

@ -140,13 +140,21 @@ impl VerbosityLevel {
/// get the [Level] for that VerbosityLevel
#[inline]
pub fn level(&self) -> Level {
match self.value() {
let v = self.value();
match v {
0 => Level::ERROR,
1 => Level::WARN,
2 => Level::INFO,
3 => Level::DEBUG,
4 => Level::TRACE,
_ => Level::ERROR,
_ => {
if v > 4 {
Level::TRACE
} else {
/* v < 0 */
Level::ERROR
}
}
}
}