-
Notifications
You must be signed in to change notification settings - Fork 13k
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 doc examples for FileType struct #35076
Conversation
/// let metadata = try!(fs::metadata("foo.txt")); | ||
/// let file_type = metadata.file_type(); | ||
/// | ||
/// assert!(file_type.is_file() == true); |
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.
Alternatively, just assert!(file_type.is_file());
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 like being explicit. :)
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.
If you want to keep the ==
, why not use assert_eq!
?
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.
Good idea!
1c93002
to
3e46c9d
Compare
Updated. |
@bors: r+ rollup |
📌 Commit 3e46c9d has been approved by |
…eveklabnik Add doc examples for FileType struct Part of rust-lang#29356. r? @steveklabnik
…eveklabnik Add doc examples for FileType struct Part of rust-lang#29356. r? @steveklabnik
…eveklabnik Add doc examples for FileType struct Part of rust-lang#29356. r? @steveklabnik
…eveklabnik Add doc examples for FileType struct Part of rust-lang#29356. r? @steveklabnik
Rollup of 30 pull requests - Successful merges: #34319, #35041, #35042, #35076, #35109, #35137, #35175, #35181, #35182, #35189, #35239, #35264, #35266, #35281, #35285, #35289, #35291, #35294, #35296, #35297, #35298, #35299, #35318, #35319, #35324, #35326, #35328, #35333, #35359, #35362 - Failed merges:
Part of #29356.
r? @steveklabnik