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 BinaryHeap::try_reserve and BinaryHeap::try_reserve_exact #91529

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

TennyZhuang
Copy link
Contributor

try_reserve of many collections were stablized in #87993 in 1.57.0. Add try_reserve for the rest collections such as BinaryHeap should be not controversial.

@rust-highfive
Copy link
Collaborator

r? @yaahc

(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 4, 2021
@rust-log-analyzer

This comment has been minimized.

@TennyZhuang
Copy link
Contributor Author

@rustbot label: +T-libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 5, 2021
@Xuanwo
Copy link
Contributor

Xuanwo commented Dec 5, 2021

I think this PR should be part of #48043

@TennyZhuang
Copy link
Contributor Author

I think this PR should be part of #48043

But the feature was stabilized in 1.57.0, we need another feature gate.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 6, 2021
…scottmcm

Suggest try_reserve in try_reserve_exact

During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 6, 2021
…scottmcm

Suggest try_reserve in try_reserve_exact

During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 7, 2021
…scottmcm

Suggest try_reserve in try_reserve_exact

During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 7, 2021
…scottmcm

Suggest try_reserve in try_reserve_exact

During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
@yaahc
Copy link
Member

yaahc commented Dec 10, 2021

lgtm, just needs a tracking issue. I agree that you should setup a new one since the related feature has already merged.

@TennyZhuang
Copy link
Contributor Author

lgtm, just needs a tracking issue. I agree that you should setup a new one since the related feature has already merged.

Is it necessary for me to create an RFC other than for tracking issues?

@yaahc
Copy link
Member

yaahc commented Dec 11, 2021

lgtm, just needs a tracking issue. I agree that you should setup a new one since the related feature has already merged.

Is it necessary for me to create an RFC other than for tracking issues?

No, not in this case.

Signed-off-by: TennyZhuang <zty0826@gmail.com>
@TennyZhuang
Copy link
Contributor Author

@yaahc Thanks for your review!

I've added a tracking issue #91789 and a feature gate try_reserve_2.

@yaahc
Copy link
Member

yaahc commented Dec 14, 2021

Looks great, thank you very much!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 14, 2021

📌 Commit 2235af1 has been approved by yaahc

@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 14, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2021
…, r=yaahc

add BinaryHeap::try_reserve and BinaryHeap::try_reserve_exact

`try_reserve` of many collections were stablized in rust-lang#87993 in 1.57.0. Add `try_reserve` for the rest collections such as `BinaryHeap` should be not controversial.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#91529 (add BinaryHeap::try_reserve and BinaryHeap::try_reserve_exact)
 - rust-lang#91820 (Suggest to specify a target triple when lang item is missing)
 - rust-lang#91851 (Make `MaybeUninit::zeroed` `const`)
 - rust-lang#91875 (Use try_normalize_erasing_regions in RevealAllVisitor)
 - rust-lang#91887 (Remove `in_band_lifetimes` from `rustc_const_eval`)
 - rust-lang#91892 (Fix HashStable implementation on InferTy)
 - rust-lang#91893 (Remove `in_band_lifetimes` from `rustc_hir`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7ec00cd into rust-lang:master Dec 14, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 14, 2021
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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants