-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create DateTimeParser in experimental branch ixdtf #2480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: The general shape of this solution looks good. I haven't reviewed the exact parsing logic line-by-line.
experimental/ixdtf/src/parser.rs
Outdated
} | ||
|
||
impl DateTimeSeparator { | ||
fn value(&self) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: return &'static str
instead of String
to avoid the extra allocation.
In general, the parser should require no allocations. You can achieve this by making your crate #![no_std]
and not enabling the "alloc" feature (or making it optional).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Praise: Much better error handling than the first version. I think this is basically ready to land in experimental. This is a good base we can build from.
16aa5ed
to
2548c41
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
2548c41
to
d411653
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Create DateTimeParser in experimental branch ixdtf (#2127)