-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Expose more of std::path #22208
Expose more of std::path #22208
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
cc @blaenk |
It looks good! Thank you very much. |
} | ||
|
||
/// The primary sperator for the current platform | ||
pub const MAIN_SEP: char = platform::MAIN_SEP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth exposing both of these? Wouldn't is_sep
be the same as foo == MAIN_SEP
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, Windows supports both /
and \
as separators.
30ec019
to
d855feb
Compare
@bors r+ d855febb1801dc2e9c5da80f30bf3d5bba8b5754 |
These seem used rarely enough that expanding |
Yeah, it was originally proposed as |
d855feb
to
949c37d
Compare
Fixed! @bors: r=nikomatsakis 949c37d |
949c37d
to
a433c2f
Compare
@bors: r=nikomatsakis a433c2f |
⌛ Testing commit a433c2f with merge cdb941e... |
💔 Test failed - auto-win-32-nopt-t |
a433c2f
to
66e4c2f
Compare
@bors: r=nikomatsakis 66e4c2f |
⌛ Testing commit 66e4c2f with merge 44792ef... |
💔 Test failed - auto-win-32-nopt-t |
66e4c2f
to
f2330ca
Compare
@bors: r=nikomatsakis f2330ca |
Any reason we're not exposing the |
⌛ Testing commit f2330ca with merge 2b151cb... |
💔 Test failed - auto-win-32-nopt-t |
f2330ca
to
3dd3f2d
Compare
This commit exposes the `is_sep` function and `MAIN_SEP` constant, as well as Windows path prefixes. The path prefix enum is safely exposed on all platforms, but it only yielded as a component for Windows. Exposing the prefix enum as part of prefix components involved changing the type from `OsStr` to the `Prefix` enum, which is a: [breaking-change]
3dd3f2d
to
4a9dd3f
Compare
⌛ Testing commit 4a9dd3f with merge 4361aee... |
💔 Test failed - auto-win-32-nopt-t |
@bors: retry |
This commit exposes the `is_sep` function and `MAIN_SEP` constant, as well as Windows path prefixes. The path prefix enum is safely exposed on all platforms, but it only yielded as a component for Windows. Exposing the prefix enum as part of prefix components involved changing the type from `OsStr` to the `Prefix` enum, which is a: [breaking-change]
⌛ Testing commit 4a9dd3f with merge 8d158c5... |
💔 Test failed - auto-mac-32-opt |
@bors: retry |
⌛ Testing commit 4a9dd3f with merge 8c0b78e... |
This commit exposes the
is_sep
function andMAIN_SEP
constant, aswell as Windows path prefixes. The path prefix enum is safely exposed on
all platforms, but it only yielded as a component for Windows.
Exposing the prefix enum as part of prefix components involved changing
the type from
OsStr
to thePrefix
enum, which is a:[breaking-change]