-
Notifications
You must be signed in to change notification settings - Fork 7
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
Port docs and some other fixes #12
Conversation
Added one new commit. We are currently unable to parse comments correctly in If a comment is present and not all four year, month, day and time values are present, the regex will consider the comment to be one of the four fields. This is easy to avoid by making the regex more precise. This will allow us to remove a workaround in chrono-tz: https://github.com/chronotope/chrono-tz/blob/main/chrono-tz-build/src/lib.rs#L24. |
Added the original history with a merge commit. Not sure if GitHub has a better way to visualize it than https://github.com/chronotope/parse-zoneinfo/commits/port_docs/. @djc is this what you had in mind with:
|
I think any new commits from you should be in a separate PR. For this PR I'd like to see a detailed list of the commands that you issued/work that you did to get here? Ideally this should be the minimal steps that go from |
In that case I'd rather make the merge in another PR, it was tacked on to the work here. |
I think we should merge the other repo's history before we add any additional changes here, otherwise the merge will only get more complicated. |
e2d124b
to
12e87c6
Compare
src/line.rs
Outdated
pub fn new() -> Self { | ||
Self::default() | ||
} |
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.
I'd prefer to just leave this out.
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.
I did not want to make this a breaking change only to fix a clippy warning. There are no other changes yet that warrant a new major release.
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.
Okay, maybe add a #[deprecated]
at least?
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.
Done. I still prefer new()
myself.
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.
Why?
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.
It is shorter, familiar, and still somewhat of a convention to have new
. Of course it is completely redundant if you have default()
.
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.
Fair -- my counter arguments would be:
- Short: 3 vs 7 characters, not an important difference
- Familiar: here, too, the difference seems very small
- Convention: both are a convention, but there is more type system pressure for
Default
In the end, given that it is redundant, I prefer having less code.
This ports the documentation and two simple commits from zoneinfo-parse.
I also included a few commits to fix rust and clippy warnings and to update to rust 2021.