Skip to content

Commit

Permalink
Remove duplicate checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Apr 11, 2024
1 parent a799ecf commit 3b7fa22
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/format/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,25 +424,16 @@ where
}

&Internal(InternalFixed { val: InternalInternal::Nanosecond3NoDot }) => {
if s.len() < 3 {
return Err(TOO_SHORT);
}
let nano = try_consume!(scan::nanosecond_fixed(s, 3));
parsed.set_nanosecond(nano)?;
}

&Internal(InternalFixed { val: InternalInternal::Nanosecond6NoDot }) => {
if s.len() < 6 {
return Err(TOO_SHORT);
}
let nano = try_consume!(scan::nanosecond_fixed(s, 6));
parsed.set_nanosecond(nano)?;
}

&Internal(InternalFixed { val: InternalInternal::Nanosecond9NoDot }) => {
if s.len() < 9 {
return Err(TOO_SHORT);
}
let nano = try_consume!(scan::nanosecond_fixed(s, 9));
parsed.set_nanosecond(nano)?;
}
Expand Down

0 comments on commit 3b7fa22

Please sign in to comment.