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

expost Path::sep{,_byte} #11642

Merged
merged 1 commit into from
Jan 19, 2014
Merged

expost Path::sep{,_byte} #11642

merged 1 commit into from
Jan 19, 2014

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jan 18, 2014

This pull request exposes a platform independent way to get the path separator. This is useful when building complicated paths by hand.

@lilyball
Copy link
Contributor

lgtm. Thanks.

@@ -117,6 +117,20 @@ pub use StrComponentIter = self::windows::StrComponentIter;
#[cfg(windows)]
pub use RevStrComponentIter = self::windows::RevStrComponentIter;

/// Typedef for the platform-native separator character.
#[cfg(unix)]
pub use sep = self::posix::sep;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistically, shouldn't these be SEP and SEP_BYTE?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, possibly. We've been exposing std::path::posix::sep and std::path::windows::sep already. I have no objection to capitalizing them though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huonw: good point, capitalizing them now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also, it's not a "typedef" so much as an alias.)

@huonw
Copy link
Member

huonw commented Jan 18, 2014

r=me after fixing the doc comment nit.

bors added a commit that referenced this pull request Jan 19, 2014
This pull request exposes a platform independent way to get the path separator. This is useful when building complicated paths by hand.
@bors bors closed this Jan 19, 2014
@bors bors merged commit f13086f into rust-lang:master Jan 19, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 11, 2024
improve [`cast_sign_loss`], to skip warning on always positive expressions

fixes: rust-lang#11642

changelog: improve [`cast_sign_loss`] to skip warning on always positive expressions

Turns out this is change became quite big, and I still can't cover all the cases, like method calls such as `POSITIVE_NUM.mul(POSITIVE_NUM)`, or `NEGATIVE_NUM.div(NEGATIVE_NUM)`... but well, if I do, I'm scared that this will goes forever, so I stopped, unless it needs to be done, lol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants