Skip to content

Commit

Permalink
Remove function converting TraceLevel to LogLevelFilter.
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Jul 22, 2024
1 parent 9e7bae0 commit 396c5d2
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,6 @@ impl Binding for TraceLevel {
}

impl TraceLevel {
/// Convert the [TraceLevel] to a [log::LevelFilter].
///
/// [TraceLevel::Fatal] becomes [log::LevelFilter::Error] but otherwise all the conversions
/// are trivial.
pub const fn as_log_level_filter(self) -> log::LevelFilter {
use log::LevelFilter;

match self {
Self::None => LevelFilter::Off,
Self::Fatal | Self::Error => LevelFilter::Error,
Self::Warn => LevelFilter::Warn,
Self::Info => LevelFilter::Info,
Self::Debug => LevelFilter::Debug,
Self::Trace => LevelFilter::Trace,
}
}

/// Attempt to convert this [TraceLevel] to a [log::LevelFilter].
///
/// This is done trivially with two exceptions:
Expand Down

0 comments on commit 396c5d2

Please sign in to comment.