-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add try_reserve and try_reserve_exact for OsString #92338
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
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Xuanwo <github@xuanwo.io>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Xuanwo <github@xuanwo.io>
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Signed-off-by: Xuanwo <github@xuanwo.io>
@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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
@bors r+ |
📌 Commit d29941e has been approved by |
⌛ Testing commit d29941e with merge 36eb8c7ebc5e5fce4219c6ea512ca9ce462ee1e2... |
💔 Test failed - checks-actions |
@bors retry |
…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
Add
try_reserve
andtry_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