Skip to content

path: Move is_absolute check to sys::path#135405

Merged
bors merged 1 commit intorust-lang:masterfrom
Ayush1325:path-is-absolute
Jan 14, 2025
Merged

path: Move is_absolute check to sys::path#135405
bors merged 1 commit intorust-lang:masterfrom
Ayush1325:path-is-absolute

Conversation

@Ayush1325
Copy link
Contributor

@Ayush1325 Ayush1325 commented Jan 12, 2025

I am working on fs support for UEFI 0, which similar to windows has prefix components, but is not quite same as Windows. It also seems that Prefix is tied closely to Windows and cannot really be extended 1.

This PR just tries to remove coupling between Prefix and absolute path checking to allow platforms to provide there own implementation to check if a path is absolute or not.

I am not sure if any platform other than windows currently uses Prefix, so I have kept the path.prefix().is_some() check in most cases.

Loading
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. 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