-
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
fix an incorrect assertion in the doc example for std::io::copy
#44712
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -40,9 +40,10 @@ use mem; | |||
/// | |||
/// io::copy(&mut reader, &mut writer)?; | |||
/// | |||
/// assert_eq!(reader, &writer[..]); |
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.
reader
is an empty slice at this point.
It seems a bit weird that we'd be avoiding running this code to me as well. |
Thanks! @bors: r+ rollup |
📌 Commit c9099ff has been approved by |
A lot of stuff in That said, this one seems fine to execute. |
fix an incorrect assertion in the doc example for `std::io::copy` I think this wasn't caught by CI because the `foo` wrapper function was only defined and not called. This seems to be the norm for doc examples that define a `foo` function. Is that on purpose?
fix an incorrect assertion in the doc example for `std::io::copy` I think this wasn't caught by CI because the `foo` wrapper function was only defined and not called. This seems to be the norm for doc examples that define a `foo` function. Is that on purpose?
I think this wasn't caught by CI because the
foo
wrapper function was only defined and not called. This seems to be the norm for doc examples that define afoo
function. Is that on purpose?