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 try_reserve and try_reserve_exact for OsString #92338

Merged
merged 7 commits into from
Jan 1, 2022

Conversation

Xuanwo
Copy link
Contributor

@Xuanwo Xuanwo commented Dec 28, 2021

Add try_reserve and try_reserve_exact for OsString.

Part of #91789

I will squash the commits after PR is ready to merge.

Signed-off-by: Xuanwo github@xuanwo.io

Signed-off-by: Xuanwo <github@xuanwo.io>
@rust-highfive
Copy link
Collaborator

r? @dtolnay

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

This comment has been minimized.

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo marked this pull request as draft December 28, 2021 03:46
@rust-log-analyzer

This comment has been minimized.

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo Xuanwo marked this pull request as ready for review December 28, 2021 04:38
library/std/src/ffi/os_str.rs Outdated Show resolved Hide resolved
library/std/src/ffi/os_str.rs Outdated Show resolved Hide resolved
library/std/src/ffi/os_str.rs Outdated Show resolved Hide resolved
@dtolnay dtolnay added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 28, 2021
Xuanwo and others added 2 commits December 29, 2021 13:49
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Contributor Author

Xuanwo commented Dec 29, 2021

@dtolnay Thanks for the nice and patient review, I have addressed all comments, PTAL.

It appears `find_max_slow` comes from the BinaryHeap docs, where the
try_reserve example is a slow implementation of find_max. It has no
relevance to this code in OsString though.
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dtolnay
Copy link
Member

dtolnay commented Dec 30, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Dec 30, 2021

📌 Commit d29941e has been approved by dtolnay

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 30, 2021
@bors
Copy link
Contributor

bors commented Dec 31, 2021

⌛ Testing commit d29941e with merge 36eb8c7ebc5e5fce4219c6ea512ca9ce462ee1e2...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Dec 31, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 31, 2021
@matthiaskrgr
Copy link
Member

@bors retry

@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 31, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 31, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#90383 (Extend check for UnsafeCell in consts to cover unions)
 - rust-lang#91375 (config.rs: Add support for a per-target default_linker option.)
 - rust-lang#91480 (rustdoc: use smaller number of colors to distinguish items)
 - rust-lang#92338 (Add try_reserve and  try_reserve_exact for OsString)
 - rust-lang#92405 (Add a couple needs-asm-support headers to tests)
 - rust-lang#92435 (Sync rustc_codegen_cranelift)
 - rust-lang#92440 (Fix mobile toggles position)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8322603 into rust-lang:master Jan 1, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 1, 2022
@Xuanwo Xuanwo deleted the try_reserve branch January 1, 2022 04:53
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.

8 participants