Skip to content

Commit 83fc360

Browse files
committed
Remove duplicate checks
1 parent 9c4af36 commit 83fc360

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/format/parse.rs

-9
Original file line numberDiff line numberDiff line change
@@ -424,25 +424,16 @@ where
424424
}
425425

426426
&Internal(InternalFixed { val: InternalInternal::Nanosecond3NoDot }) => {
427-
if s.len() < 3 {
428-
return Err(TOO_SHORT);
429-
}
430427
let nano = try_consume!(scan::nanosecond_fixed(s, 3));
431428
parsed.set_nanosecond(nano)?;
432429
}
433430

434431
&Internal(InternalFixed { val: InternalInternal::Nanosecond6NoDot }) => {
435-
if s.len() < 6 {
436-
return Err(TOO_SHORT);
437-
}
438432
let nano = try_consume!(scan::nanosecond_fixed(s, 6));
439433
parsed.set_nanosecond(nano)?;
440434
}
441435

442436
&Internal(InternalFixed { val: InternalInternal::Nanosecond9NoDot }) => {
443-
if s.len() < 9 {
444-
return Err(TOO_SHORT);
445-
}
446437
let nano = try_consume!(scan::nanosecond_fixed(s, 9));
447438
parsed.set_nanosecond(nano)?;
448439
}

0 commit comments

Comments
 (0)