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

unix: Avoid name conversions in remove_dir_all_recursive #94724

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Mar 8, 2022

Each recursive call was creating an OsString for a &Path, only for
it to be turned into a CString right away. Instead we can directly
pass .name_cstr(), saving two allocations each time.

Each recursive call was creating an `OsString` for a `&Path`, only for
it to be turned into a `CString` right away. Instead we can directly
pass `.name_cstr()`, saving two allocations each time.
@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 Mar 8, 2022
@Dylan-DPC
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 8, 2022

📌 Commit ef3e33b has been approved by Dylan-DPC

@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 Mar 8, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#94689 (Use impl substs in `#[rustc_on_unimplemented]`)
 - rust-lang#94714 (Enable `close_read_wakes_up` test on Windows)
 - rust-lang#94723 (Add core::hint::must_use)
 - rust-lang#94724 (unix: Avoid name conversions in `remove_dir_all_recursive`)
 - rust-lang#94730 (Reverted atomic_mut_ptr feature removal causing compilation break)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a67b629 into rust-lang:master Mar 9, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 9, 2022
@cuviper cuviper deleted the rmdirall-cstr branch April 12, 2022 17:54
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