Skip to content

Add Path::has_trailing_sep and related methods #142506

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

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

Conversation

clarfonthey
Copy link
Contributor

@clarfonthey clarfonthey commented Jun 14, 2025

Implements rust-lang/libs-team#335.

Tracking issue: #142503

Notable differences from ACP:

  • trim_trailing_sep was added to Path since it felt reasonable to ensure that the inverse operation was available.
  • Per suggestion of @kennytm, added push_trailing_sep and pop_trailing_sep to PathBuf in addition to set_trailing_sep.

This also updates some of the docs on various Path methods to use the term "trailing separator" instead of "trailing slash" for consistency.

@rustbot
Copy link
Collaborator

rustbot commented Jun 14, 2025

r? @joboet

rustbot has assigned @joboet.
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 Jun 14, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@clarfonthey clarfonthey force-pushed the path-trailing-sep branch 2 times, most recently from 9547ab7 to c5f456e Compare June 15, 2025 17:12
@rust-log-analyzer

This comment has been minimized.

@clarfonthey
Copy link
Contributor Author

@rustbot author

@rustbot rustbot 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 Jun 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 15, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-2 failed! Check out the build log: (web) (plain)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants