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

feat: add with_replaced_extension as a alias of with_extension #134676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anatawa12
Copy link
Contributor

This PR adds Path::with_replaced_extension that is exactly same as Path::with_extension but with proper name.

This PR implements some portion of my suggestion about path_add_extension feature since one positive reaction are received.
#127292 (comment)

Currently, this new function is under path_add_extension feature but it might be better to move under another feature.
Should I split feature flag?

After thinking a while since I suggested, I think PathBuf::set_extension is not as ambiguous as Path::with_extension so I don't added here.
However not adding replace_extension would be a little inconsistent so there is possibility to be better to add PathBuf::replace_extension.
I want to ask for community and library team.

Relates to path_add_extension feature which is tracked in #127292

@rustbot
Copy link
Collaborator

rustbot commented Dec 23, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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 rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants