Fix clippy issue & add fmt check

This commit is contained in:
2023-08-04 10:46:02 -04:00
parent b9fd6e077a
commit 2ccb5f7b36
2 changed files with 21 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ impl ToString for LogLevel {
impl FromArgValue for LogLevel {
fn from_arg_value(value: &OsStr) -> Result<Self, String> {
String::from_arg_value(value)
.and_then(|s| Self::from_str(&s).map_err(|_| format!("Invalid log level")))
.and_then(|s| Self::from_str(&s).map_err(|_| "Invalid log level".to_string()))
}
}