Skip to content
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

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

QuietMisdreavus
Copy link
Member

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.

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@QuietMisdreavus
Copy link
Member Author

r? @rust-lang/docs

@carols10cents
Copy link
Member

I don't think highfive understands teams yet, sooooo

r? @steveklabnik

@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 24, 2017
@QuietMisdreavus
Copy link
Member Author

@carols10cents Yeah, it was mainly to just ping the team as a whole, and stick it on whoever checked their email first >_>

@@ -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
Copy link
Member

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.

@steveklabnik
Copy link
Member

r=me after said URL is added

@QuietMisdreavus
Copy link
Member Author

Updated. I ran linkchecker locally and it worked just fine, but i'll wait for travis all the same.

@QuietMisdreavus
Copy link
Member Author

@bors r=steveklabnik rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2017

📌 Commit 6e36769 has been approved by steveklabnik

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jul 26, 2017
…=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.
bors added a commit that referenced this pull request Jul 26, 2017
Rollup of 10 pull requests

- Successful merges: #42959, #43447, #43455, #43456, #43458, #43462, #43463, #43465, #43471, #43480
- Failed merges:
@bors bors merged commit 6e36769 into rust-lang:master Jul 26, 2017
@QuietMisdreavus QuietMisdreavus deleted the extend-spec-docs branch July 29, 2017 23:02
@QuietMisdreavus QuietMisdreavus restored the extend-spec-docs branch August 16, 2017 00:16
@QuietMisdreavus QuietMisdreavus deleted the extend-spec-docs branch August 16, 2017 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants