-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 a note to Vec's Extend<&T> impl about its slice specialization #43455
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
r? @rust-lang/docs |
I don't think highfive understands teams yet, sooooo |
@carols10cents Yeah, it was mainly to just ping the team as a whole, and stick it on whoever checked their email first |
src/liballoc/vec.rs
Outdated
@@ -1962,6 +1962,10 @@ impl<T> Vec<T> { | |||
|
|||
} | |||
|
|||
/// Extend implementation that copies elements out of references before pushing them onto the Vec. | |||
/// | |||
/// This implementation is specialized for slice iterators, where it uses `copy_from_slice` to |
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.
Missing url for copy_from_slice
.
r=me after said URL is added |
6d6808a
to
6e36769
Compare
Updated. I ran linkchecker locally and it worked just fine, but i'll wait for travis all the same. |
@bors r=steveklabnik rollup |
📌 Commit 6e36769 has been approved by |
…=steveklabnik add a note to Vec's Extend<&T> impl about its slice specialization From the regular documentation view, it's not at all apparent that [this specialization](https://github.com/rust-lang/rust/blob/5669c9988f50788b5ab5dee2d4538519d4e5663d/src/liballoc/vec.rs#L1879-L1891) exists for `slice::Iter`. This adds a documentation blurb to the Extend impl itself to note that this optimization exists.
From the regular documentation view, it's not at all apparent that this specialization exists for
slice::Iter
. This adds a documentation blurb to the Extend impl itself to note that this optimization exists.