Ref: Vereinfacht try_from-Signatur in LogLevel-Implementierung.

This commit is contained in:
2025-08-20 23:35:33 +02:00
parent 5f85245090
commit d3f6e23965

View File

@@ -26,9 +26,9 @@ use std::fs::{create_dir_all, File, OpenOptions};
use std::io::{stdout, IsTerminal, Write};
use std::sync::{Mutex, OnceLock};
use time::{macros::format_description, OffsetDateTime};
use crate::program;
use crate::config;
use crate::program;
use time::{macros::format_description, OffsetDateTime};
/// Schweregrade für Logeinträge in aufsteigender Detailtiefe.
///
@@ -65,7 +65,7 @@ impl Display for LogLevel {
impl TryFrom<String> for LogLevel {
type Error = LogLevel;
fn try_from(value: std::string::String) -> Result<Self, Self> {
fn try_from(value: String) -> Result<Self, Self> {
match value.to_lowercase().as_str() {
"error" => Ok(LogLevel::Error),
"warn" => Ok(LogLevel::Warn),