1
0
Fork 0
forked from wry/wry

static-text: add new utility

This commit is contained in:
Julian Orth 2026-03-07 12:23:01 +01:00
parent 8f57f72d14
commit 97f7b68369
10 changed files with 150 additions and 15 deletions

View file

@ -77,6 +77,7 @@ use {
rc_eq::RcEq,
refcounted::RefCounted,
run_toplevel::RunToplevel,
static_text::StaticText,
tri::Try,
},
version::VERSION,
@ -850,6 +851,19 @@ impl From<LevelFilter> for LogLevel {
}
}
impl StaticText for LogLevel {
fn text(&self) -> &'static str {
match self {
LogLevel::Off => "Off",
LogLevel::Error => "Error",
LogLevel::Warn => "Warn",
LogLevel::Info => "Info",
LogLevel::Debug => "Debug",
LogLevel::Trace => "Trace",
}
}
}
impl From<ConfigLogLevel> for LogLevel {
fn from(value: ConfigLogLevel) -> Self {
match value {