-
Notifications
You must be signed in to change notification settings - Fork 778
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
Adds std::duration::Duration from/to Python conversions #3670
Conversation
We already support Things to notice:
|
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.
LGTM
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.
👍 likewise, thanks!
It's a little sad that Rust stdlib duration is strictly positive, but that's not really our design problem to worry about here.
Hmm, there are some test failures?
Yeah I think that's fine to warn 👍 |
Thank you for the review!
My bad. It should be fixed now.
After thinking a bit more about it, I believe warning is a bad idea: it might overflow the warning logs if the conversion is done a lot of times. And it is likely there are cases where the user does not care about the precision loss (for example if the duration is an elapsed time between two timestamp). I would tend to just remove it (like |
@Tpt Argh, unused import on |
33875e8
to
0752942
Compare
Pushed a fixup. |
No description provided.