Skip to content

Commit

Permalink
Clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Oct 8, 2024
1 parent f25802f commit 9a7603f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions time/src/parsing/parsable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,7 @@ impl sealed::Sealed for Rfc3339 {
// readability, to specify a full-date and full-time separated by
// (say) a space character.
// Specifically, rusqlite uses space separators.
let input = input
.get(1..)
.ok_or_else(|| InvalidComponent("separator"))?;
let input = input.get(1..).ok_or(InvalidComponent("separator"))?;

let input = exactly_n_digits::<2, _>(input)
.and_then(|item| item.consume_value(|value| parsed.set_hour_24(value)))
Expand Down Expand Up @@ -633,9 +631,7 @@ impl sealed::Sealed for Rfc3339 {
// readability, to specify a full-date and full-time separated by
// (say) a space character.
// Specifically, rusqlite uses space separators.
let input = input
.get(1..)
.ok_or_else(|| InvalidComponent("separator"))?;
let input = input.get(1..).ok_or(InvalidComponent("separator"))?;

let ParsedItem(input, hour) =
exactly_n_digits::<2, _>(input).ok_or(InvalidComponent("hour"))?;
Expand Down

0 comments on commit 9a7603f

Please sign in to comment.