Skip to content
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

Fix Duration::abs() for negative durations with nanos #734

Merged
merged 2 commits into from Jul 15, 2022

Conversation

abreis
Copy link
Contributor

@abreis abreis commented Jul 14, 2022

The abs() method on oldtime::Duration, introduced in #418, was incorrect whenever a negative duration had non-zero nanos. This PR fixes it and adds a few simple tests.

@abreis abreis marked this pull request as draft July 14, 2022 23:56
@abreis abreis marked this pull request as ready for review July 15, 2022 00:09
@djc djc merged commit 187819f into chronotope:main Jul 15, 2022
@djc
Copy link
Contributor

djc commented Jul 15, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants