-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Duration doc #38346
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
Duration doc #38346
Conversation
22088dc
to
57353e2
Compare
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.
r=me unless you want to address my comment
src/libstd/time/duration.rs
Outdated
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.
This is not exactly five seconds so the variable binding name is slightly misleading. Could also just call it something generic like duration
. Not a super big deal.
src/libstd/time/duration.rs
Outdated
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.
Glad you fixed the +
→ -
error here :)
src/libstd/time/duration.rs
Outdated
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.
This last sentence is not true anymore – you may now do arithmetic on duration as well.
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'll remove it then.
src/libstd/time/duration.rs
Outdated
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.
Drive-by fix: division cannot underflow or overflow in other != Duraton::from_secs(0)
as having a negative or floaty duration is not possible.
src/libstd/time/duration.rs
Outdated
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.
Drive-by fix: multiplication cannot underflow as negative durations are impossible.
57353e2
to
60fbe7a
Compare
Updated. |
@bors r+ rollup |
📌 Commit 60fbe7a has been approved by |
…sxcv Duration doc r? @frewsxcv
…sxcv Duration doc r? @frewsxcv
⌛ Testing commit 60fbe7a with merge 47d4a02... |
💔 Test failed - auto-mac-64-opt-rustbuild |
@bors: retry |
⌛ Testing commit 60fbe7a with merge a6a4315... |
💔 Test failed - auto-mac-64-opt-rustbuild |
@bors: retry
…On Fri, Dec 16, 2016 at 7:59 AM, bors ***@***.***> wrote:
⌛️ Testing commit 60fbe7a
<60fbe7a>
with merge a6a4315
<a6a4315>
...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#38346 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95G1KBFj5AOqkW6ou2LJ4Qt74WuRWks5rIrV_gaJpZM4LLtQD>
.
|
…sxcv Duration doc r? @frewsxcv
@bors retry |
@bors: retry |
…sxcv Duration doc r? @frewsxcv
Rollup of 29 pull requests - Successful merges: #37761, #38006, #38131, #38150, #38158, #38171, #38208, #38215, #38236, #38245, #38289, #38302, #38315, #38346, #38388, #38395, #38398, #38418, #38432, #38451, #38463, #38468, #38470, #38471, #38472, #38478, #38486, #38493, #38498 - Failed merges: #38271, #38483
r? @frewsxcv