fix build

This commit is contained in:
Denis Cornehl 2022-04-30 20:49:24 +02:00
parent 1b54874ce8
commit 0bf3148db0
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,7 @@ pub enum OptionsError {
Parse(ParseError),
/// The user supplied an illegal choice to an Argument.
BadArgument(&'static Arg, String),
BadArgument(&'static Arg, OsString),
/// The user supplied a set of options that are unsupported
Unsupported(String),

View File

@ -254,14 +254,13 @@ impl TimeFormat {
}
};
let word = word.to_string_lossy();
match word.as_ref() {
match word.to_string_lossy().as_ref() {
"default" => Ok(Self::DefaultFormat),
"relative" => Ok(Self::Relative),
"iso" => Ok(Self::ISOFormat),
"long-iso" => Ok(Self::LongISO),
"full-iso" => Ok(Self::FullISO),
_ => Err(OptionsError::BadArgument(&flags::TIME_STYLE, word.to_string()))
_ => Err(OptionsError::BadArgument(&flags::TIME_STYLE, word))
}
}
}