Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd equivalents of C's <ctype.h> functions to AsciiExt. #39659
Conversation
rust-highfive
assigned
sfackler
Feb 8, 2017
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sfackler (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
sfackler
added
the
T-libs
label
Feb 8, 2017
This comment has been minimized.
This comment has been minimized.
|
I've always been a bit annoyed this is a separate trait at all. Might be worth inlining these while we're at it. |
This comment has been minimized.
This comment has been minimized.
I assume by that you mean folding the entire AsciiExt trait into the types it extends. I don't disagree, but can that be done compatibly? There's already a compatibility kludge (the |
This comment has been minimized.
This comment has been minimized.
|
The idea would be that we deprecate this entire module and just move to inherent methods. |
This comment has been minimized.
This comment has been minimized.
Interesting -- I don't think there's a good rationale for them being extension methods right now. (Maybe there was at some point, pre-DST). Given that all the methods include I'm also |
This comment has been minimized.
This comment has been minimized.
|
I don't mind doing the work to turn |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looks good to me as well! I believe the intention of the trait was to add the method to I'd be tempted to punt the migration to inherent methods (if at all) to a future PR though and go ahead and land this. Thoughts? |
This comment has been minimized.
This comment has been minimized.
|
@zackw it also looks like tidy may be failing on travis? |
This comment has been minimized.
This comment has been minimized.
Yeah, that probably makes sense. I do think it'd be a nice change, but it's orthogonal. |
This comment has been minimized.
This comment has been minimized.
Yeah, that's because the added documentation contains two very long URLs. I have just pushed a change to squeeze those lines in under the limit (by shortening the |
This comment has been minimized.
This comment has been minimized.
|
Shame on you for writing thorough documentation! :) |
This comment has been minimized.
This comment has been minimized.
|
Okay, now the problem is that the doc tests for the new unstable feature aren't properly annotated to say that they use the new unstable feature. Can one of you please tell me how to do that? |
This comment has been minimized.
This comment has been minimized.
|
Oh you can just prefix the tests with |
This comment has been minimized.
This comment has been minimized.
That part I know. What I don't know is how to run the doc tests locally, so that I can verify that I did it right before pushing. |
This comment has been minimized.
This comment has been minimized.
|
Oh for that you can use |
This comment has been minimized.
This comment has been minimized.
|
We discussed this is the libs team meeting, and we're all in favor of merging as-is. Feel free to open a separate PR to move to inherent methods as well! r=me once the travis failure is addressed. |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Oh, I see now. |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
bors
added a commit
that referenced
this pull request
Feb 14, 2017
bors
merged commit 162240c
into
rust-lang:master
Feb 15, 2017
1 check passed
This comment has been minimized.
This comment has been minimized.
Sure! @zackw For For |
This comment has been minimized.
This comment has been minimized.
|
Might be simpler to just stick it in the |
This comment has been minimized.
This comment has been minimized.
But |
This comment has been minimized.
This comment has been minimized.
|
Oh duh, never mind me. |
petrochenkov
referenced this pull request
Feb 19, 2017
Closed
Separate to_lowercase() into correct Unicode and simple implementations #26244
SimonSapin
reviewed
Feb 22, 2017
| /// Checks if the value is an ASCII graphic character: | ||
| /// U+0021 '@' ... U+007E '~'. | ||
| /// For strings, true if all characters in the string are | ||
| /// ASCII punctuation. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
When doing this, please make sure that |
zackw commentedFeb 8, 2017
is_ascii_alphabeticis_ascii_uppercaseis_ascii_lowercaseis_ascii_alphanumericis_ascii_digitis_ascii_hexdigitis_ascii_punctuationis_ascii_graphicis_ascii_whitespaceis_ascii_controlThis addresses issue #39658.
Lightly tested on x86-64-linux. tidy complains about the URLs in the documentation making lines too long, I don't know what to do about that.