3

refactor(vendor): tiny not important refactors by weihanglo · Pull Request #1361...

 4 weeks ago
source link: https://github.com/rust-lang/cargo/pull/13610
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

refactor(vendor): tiny not important refactors #13610

Conversation

Member

What does this PR try to resolve?

Did some tiny refactors in cargo vendor I found when working on other stuff.

How should we test and review this PR?

I believe std::path::Path should be quite cross-platform compatible, as [it calls into something like GetFullPathNameW eventually when being used. I might be wrong though.

See #13610 (comment)

Additional information

Collaborator

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot

added Command-vendor

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Mar 20, 2024

let dst = relative

.iter()

.fold(dst.to_owned(), |acc, component| acc.join(&component));

let dst = dst.join(relative);

paths::create_dir_all(dst.parent().unwrap())?;

Contributor

I assume this comment is relevant here

I believe std::path::Path should be quite cross-platform compatible, as [it calls into something like GetFullPathNameW eventually when being used. I might be wrong though.

I assume this was done for a reason though so I'm a bit cautious and would like input from others.

Member

Author

This evil behavior is deeply rooted in Cargo 😞.

Contributor

@bors r+

Collaborator

📌 Commit 9f96d7b has been approved by epage

It is now in the queue for this repository.

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 20, 2024

Collaborator

⌛ Testing commit 9f96d7b with merge 5b776ec...

Collaborator

☀️ Test successful - checks-actions
Approved by: epage
Pushing 5b776ec to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

epage

epage left review comments
Assignees

epage

Labels
Command-vendor S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

None yet

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK