-
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
Use Vec::drain in BufWriter #27024
Use Vec::drain in BufWriter #27024
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Does calling |
It removes all the drained items regardless if you iterate it or not. I checked the compilation of this use case back when I added drain, it should compile to the same code. (I.e. just the ptr::copy). |
Regarding laziness, during iteration it only reads out values ( |
@bors: r+ b9543ae360e27804747759cd4cc085ca4aaee80d Yay! |
⌛ Testing commit b9543ae with merge 181a8e5... |
💔 Test failed - auto-mac-64-opt |
I happened past a comment that asked for functionality that we now have.
Sigh, forgot to remove an import and didn't see that warning |
@bors r=alexcrichton |
📌 Commit 7b51c1c has been approved by |
Use Vec::drain in BufWriter I happened past a comment that asked for functionality that we now have.
Bors come back, stop being weird 😭 |
This passed all tests except for the android builder which apparently disappeared, so I'm going to merge this manually. |
Use Vec::drain in BufWriter
I happened past a comment that asked for functionality that we now have.