Skip to content

Commit

Permalink
Remove internal DateTime struct
Browse files Browse the repository at this point in the history
While it would be great to have this in the future, Rust's functionality
is not currently powerful enough to represent what is necessary without
far too much overhead and needless complexity.
  • Loading branch information
jhpratt committed Jan 28, 2024
1 parent d7d9f6a commit f69ef71
Show file tree
Hide file tree
Showing 11 changed files with 692 additions and 1,595 deletions.
2 changes: 1 addition & 1 deletion tests/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ fn rfc_3339_err() {
));
assert!(matches!(
PrimitiveDateTime::parse("2021-13-01T00:00:00Z", &Rfc3339),
Err(error::Parse::TryFromParsed(error::TryFromParsed::ComponentRange(component))) if component.name() == "month"
invalid_component!("month")
));
assert!(matches!(
PrimitiveDateTime::parse("2021-01-02T03:04:60Z", &Rfc3339),
Expand Down
Loading

0 comments on commit f69ef71

Please sign in to comment.