-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
In doc examples, don't ignore read/write results #59532
Conversation
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
r? @Centril -- r=me rollup with green travis. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Calling `Read::read` or `Write::write` without checking the returned `usize` value is almost always an error. Example code in the documentation should demonstrate how to use the return value correctly. Otherwise, people might copy the example code thinking that it is okay to "fire and forget" these methods.
@bors r+ rollup |
📌 Commit b6fb3e3 has been approved by |
In doc examples, don't ignore read/write results Calling `Read::read` or `Write::write` without checking the returned `usize` value is almost always an error. Example code in the documentation should demonstrate how to use the return value correctly. Otherwise, people might copy the example code thinking that it is okay to "fire and forget" these methods.
In doc examples, don't ignore read/write results Calling `Read::read` or `Write::write` without checking the returned `usize` value is almost always an error. Example code in the documentation should demonstrate how to use the return value correctly. Otherwise, people might copy the example code thinking that it is okay to "fire and forget" these methods.
Rollup of 10 pull requests Successful merges: - #59376 (RFC 2008: Enum Variants) - #59453 (Recover from parse error in tuple syntax) - #59455 (Account for short-hand field syntax when suggesting borrow) - #59499 (Fix broken download link in the armhf-gnu image) - #59512 (implement `AsRawFd` for stdio locks) - #59525 (Whitelist some rustc attrs) - #59528 (Improve the dbg! macro docs ) - #59532 (In doc examples, don't ignore read/write results) - #59534 (rustdoc: collapse blanket impls in the same way as normal impls) - #59537 (Fix OnceWith docstring.) Failed merges: r? @ghost
Calling
Read::read
orWrite::write
without checking the returnedusize
value is almost always an error. Example code in the documentation should demonstrate how to use the return value correctly. Otherwise, people might copy the example code thinking that it is okay to "fire and forget" these methods.