Skip to content

Commit

Permalink
refactor: fixed clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinFillon committed Feb 17, 2024
1 parent 06d4775 commit 332e07a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/options/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ impl TypedValueParser for TimeFormatParser {
// - there is nothing after `+`
// line 1 will be empty when:
// - `+` is followed immediately by `\n`
let non_recent = match lines.next() {
Some(s) => s,
None => {
let Some(non_recent) = lines.next() else
{
return Err(Error::raw(
clap::error::ErrorKind::InvalidValue,
format!(
Expand All @@ -300,8 +299,7 @@ impl TypedValueParser for TimeFormatParser {
For example: +\"%Y-%m-%d %H:%M:%S\"",
),
))
}
};
};
let non_recent = if non_recent.is_empty() {
return Err(Error::raw(
clap::error::ErrorKind::InvalidValue,
Expand Down

0 comments on commit 332e07a

Please sign in to comment.