-
Notifications
You must be signed in to change notification settings - Fork 44
Fractional tweaks #60
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
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.
Pull Request Overview
This PR refactors the duration parsing code by extracting unit parsing logic into a separate enum and improving code organization. The changes focus on making the parsing logic more maintainable while preserving existing functionality.
Key changes:
- Introduced a new
Unitenum withFromStrimplementation to replace string matching - Refactored duration accumulation logic into a standalone function
- Reorganized method order within the
Parserimplementation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
da49f65 to
fbaa5c2
Compare
fbaa5c2 to
14afe62
Compare
Bumps humantime from 2.2.0 to 2.3.0. Release notes Sourced from humantime's releases. 2.3.0 What's Changed Add 'wk', 'wks' for weeks and 'yr', 'yrs' for years by @ryo1kato in chronotope/humantime#50 Allow parsing zero durations with no units by @RobertGauld in chronotope/humantime#43 Use µs not us by @RobertGauld in chronotope/humantime#45 feat: parse_duration("0") by @aatifsyed in chronotope/humantime#55 Support fractional durations (with precision safeguards, without any new dependency) by @TheElectronWill in chronotope/humantime#56 feat: Accept "+00:00" as an alternative way to specify the UTC timezone by @TheElectronWill in chronotope/humantime#59 Fractional tweaks by @djc in chronotope/humantime#60 Commits 7994b71 ci: disable for non-main pushes 1b59068 Bump version to 2.3.0 cacdb93 ci: add audit job 5cc8dc5 ci: add job to check semver compatibility 0d5fe2d Bump version to 2.2.1 fc0e7ea duration: move current value out of Parser 1febd52 duration: track current value as Duration 0adba12 duration: track current nanoseconds as u32 786218f Extract unit parsing 9ff48bf Re-order duration parser methods in top-down order Additional commits viewable in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Followup from