Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Mar 7, 2023
1 parent 1b54874 commit 0bf3148
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/options/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
5 changes: 2 additions & 3 deletions src/options/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
Expand Down

0 comments on commit 0bf3148

Please sign in to comment.