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

Remove duplicated fn(Box<[T]>) -> Vec<T> #84248

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

calebsander
Copy link
Contributor

@calebsander calebsander commented Apr 16, 2021

<[T]>::into_vec() does the same thing as Vec::from::<Box<[T]>>(), so they can be implemented in terms of each other. This was the previous implementation of Vec::from(), but was changed in #78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.

@rust-highfive
Copy link
Collaborator

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 16, 2021
@kennytm
Copy link
Member

kennytm commented Apr 20, 2021

r? @Amanieu

@rust-highfive rust-highfive assigned Amanieu and unassigned kennytm Apr 20, 2021
library/alloc/src/vec/mod.rs Outdated Show resolved Hide resolved
library/alloc/src/vec/mod.rs Outdated Show resolved Hide resolved
@Amanieu
Copy link
Member

Amanieu commented Apr 22, 2021

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 22, 2021

📌 Commit f505d61 has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 22, 2021
… r=Amanieu

Remove duplicated fn(Box<[T]>) -> Vec<T>

`<[T]>::into_vec()` does the same thing as `Vec::from::<Box<[T]>>()`, so they can be implemented in terms of each other. This was the previous implementation of `Vec::from()`, but was changed in rust-lang#78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 23, 2021
… r=Amanieu

Remove duplicated fn(Box<[T]>) -> Vec<T>

`<[T]>::into_vec()` does the same thing as `Vec::from::<Box<[T]>>()`, so they can be implemented in terms of each other. This was the previous implementation of `Vec::from()`, but was changed in rust-lang#78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#80805 (Improve `Iterator::by_ref` example)
 - rust-lang#84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>)
 - rust-lang#84321 (rustdoc: Convert sub-variant toggle to HTML)
 - rust-lang#84359 (:arrow_up: rust-analyzer)
 - rust-lang#84374 (Clean up .gitignore)
 - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`)
 - rust-lang#84430 (doc/platform-support: clarify UEFI support)
 - rust-lang#84433 (Prevent control, shift and alt keys to make search input lose focus)
 - rust-lang#84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls)
 - rust-lang#84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile)
 - rust-lang#84469 (Update comment on `PrimTy::name_str`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5b7c986 into rust-lang:master Apr 23, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 23, 2021
@calebsander calebsander deleted the refactor/vec-functions branch April 25, 2021 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants