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

Add code examples for libstd/time #32452

Merged
merged 1 commit into from
Mar 24, 2016
Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #29379.

r? @steveklabnik

//! ```
//! use std::time::Duration;
//!
//! let five_seconds = Duration::new(5, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Duration::from_secs() is handy here.
You may also check assert_eq!(Duration::new(5, 0), Duration::from_secs(5))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well saw, I'll add this line.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 24, 2016

📌 Commit ca609cc has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Mar 24, 2016
bors added a commit that referenced this pull request Mar 24, 2016
Rollup of 6 pull requests

- Successful merges: #32276, #32416, #32452, #32459, #32462, #32464
- Failed merges:
@bors bors merged commit ca609cc into rust-lang:master Mar 24, 2016
@GuillaumeGomez GuillaumeGomez deleted the patch-5 branch March 25, 2016 00:38
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.

4 participants