-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add make_time function #19183
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
base: main
Are you sure you want to change the base?
Add make_time function #19183
Conversation
comphead
left a comment
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.
Thanks @Omega359 the PR is LGTM, 1 nit on datatype for time constituents which can be unsigned ints.
Jefffrey
left a comment
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.
Had a quick shot at some potential refactors to see if we can simplify some of the logic here a bit; feel free to disregard, especially as they are still rough and affect some of the tests here, but I think it's worth looking into (if not now then potentially in the future).
…t doesn't seem possible to test with type coercion in function tests.
|
Not sure what to do about the cargo fmt error - the PR output is what cargo fmt results in locally. Seems very odd. |
This is so weird issue, sometime |
I've noticed cargo fmt bouncing around the ordering of imports in 1.91 in my other projects. It's rather annoying honestly and feels like needless bikeshedding. |
|
More info: the only way I could get More info: https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-version-sorting.html |
Which issue does this PR close?
Rationale for this change
There wasn't a good way to make a time from component parts.
What changes are included in this PR?
Code, test, docs
Are these changes tested?
Yes
Are there any user-facing changes?
New function.