Skip to content

Replace iterator-based set construction by *Set::From<[T; N]> #91709

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 11, 2021

Conversation

juniorbassani
Copy link
Contributor

This uses the array-based construction for BtreeSets and HashSets instead of first creating an iterator. I could also replace the let mut a = Set::new(); a.insert(...); fragments if desired.

@rust-highfive
Copy link
Contributor

r? @joshtriplett

(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 Dec 9, 2021
@jyn514
Copy link
Member

jyn514 commented Dec 9, 2021

This is a nice simplification, thanks :)

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 9, 2021

📌 Commit cebd949 has been approved by jyn514

@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 Dec 9, 2021
@jyn514 jyn514 added A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 9, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 9, 2021
…-examples, r=jyn514

Replace iterator-based set construction by *Set::From<[T; N]>

This uses the array-based construction for `BtreeSet`s and `HashSet`s instead of first creating an iterator. I could also replace the `let mut a = Set::new(); a.insert(...);` fragments if desired.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 10, 2021
…-examples, r=jyn514

Replace iterator-based set construction by *Set::From<[T; N]>

This uses the array-based construction for `BtreeSet`s and `HashSet`s instead of first creating an iterator. I could also replace the `let mut a = Set::new(); a.insert(...);` fragments if desired.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 10, 2021
…-examples, r=jyn514

Replace iterator-based set construction by *Set::From<[T; N]>

This uses the array-based construction for `BtreeSet`s and `HashSet`s instead of first creating an iterator. I could also replace the `let mut a = Set::new(); a.insert(...);` fragments if desired.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2021
…askrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#91668 (Remove the match on `ErrorKind::Other`)
 - rust-lang#91678 (Add tests fixed by rust-lang#90023)
 - rust-lang#91679 (Move core/stream/stream/mod.rs to core/stream/stream.rs)
 - rust-lang#91681 (fix typo in `intrinsics::raw_eq` docs)
 - rust-lang#91686 (Fix `Vec::reserve_exact` documentation)
 - rust-lang#91697 (Delete Utf8Lossy::from_str)
 - rust-lang#91706 (Add unstable book entries for parts of asm that are not being stabilized)
 - rust-lang#91709 (Replace iterator-based set construction by *Set::From<[T; N]>)
 - rust-lang#91716 (Improve x.py logging and defaults a bit more)
 - rust-lang#91747 (Add pierwill to .mailmap)
 - rust-lang#91755 (Fix since attribute for const_linked_list_new feature)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3beeb75 into rust-lang:master Dec 11, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants