Draft: Path::is_normalized and is_lexically_bounded#152740
Draft
MikkelPaulson wants to merge 2 commits intorust-lang:mainfrom
Draft
Draft: Path::is_normalized and is_lexically_bounded#152740MikkelPaulson wants to merge 2 commits intorust-lang:mainfrom
MikkelPaulson wants to merge 2 commits intorust-lang:mainfrom
Conversation
Draft proposal for rust-lang#134694. * Update `normalize_lexically` to be infallible and return `Cow` * Add (for discussion) `is_normalized` to shortcut the distinction between `Cow::Borrowed` and `Cow::Owned` * Add (for discussion) `is_lexically_bounded` to broadly handle the use case of the `Result` previously returned by `normalize_lexically` TODO: doctests are handled (maybe excessively), but unit tests are needed
This comment has been minimized.
This comment has been minimized.
Update behaviour of Path::is_lexically_bounded to consider the working directory unbounded, as promised by the doc comment description but not by the doctest.
4 tasks
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
☔ The latest upstream changes (presumably #153377) made this pull request unmergeable. Please resolve the merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft proposal for #134694. See parent task for discussion.
normalize_lexicallyto be infallible and returnCowis_normalizedto shortcut the distinction betweenCow::BorrowedandCow::Ownedis_lexically_boundedto broadly handle the use case of theResultpreviously returned bynormalize_lexicallyTo do (if the draft is approved):
is_normalized, including Const path separators libs-team#744is_normalizedmay need to be moved toComponentsto keep things from being too brittle