Skip to content

Duration doc#38346

Merged
bors merged 1 commit into
rust-lang:masterfrom
GuillaumeGomez:duration_doc
Dec 21, 2016
Merged

Duration doc#38346
bors merged 1 commit into
rust-lang:masterfrom
GuillaumeGomez:duration_doc

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

@GuillaumeGomez GuillaumeGomez force-pushed the duration_doc branch 2 times, most recently from 22088dc to 57353e2 Compare December 13, 2016 14:55

@frewsxcv frewsxcv left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/libstd/time/duration.rs Outdated

Copy link
Copy Markdown
Contributor

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.

Comment thread src/libstd/time/duration.rs Outdated

Copy link
Copy Markdown
Contributor

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 :)

Comment thread src/libstd/time/duration.rs Outdated

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

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.

Comment thread src/libstd/time/duration.rs Outdated

Copy link
Copy Markdown
Member

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.

Comment thread src/libstd/time/duration.rs Outdated

Copy link
Copy Markdown
Member

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.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Updated.

@frewsxcv

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Dec 14, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 60fbe7a has been approved by frewsxcv

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 15, 2016
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 16, 2016
@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 60fbe7a with merge 47d4a02...

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt-rustbuild

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@bors: retry

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 60fbe7a with merge a6a4315...

@bors

bors commented Dec 16, 2016

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt-rustbuild

@alexcrichton

alexcrichton commented Dec 16, 2016 via email

Copy link
Copy Markdown
Member

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 18, 2016
@sanxiyn

sanxiyn commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

@bors retry

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 20, 2016
bors added a commit that referenced this pull request Dec 20, 2016
@bors bors merged commit 60fbe7a into rust-lang:master Dec 21, 2016
@GuillaumeGomez GuillaumeGomez deleted the duration_doc branch December 21, 2016 16:37
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.

6 participants