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 upDeprecate the AsciiExt trait in favor of inherent methods #49109
Conversation
SimonSapin
force-pushed the
SimonSapin:deprecate-asciiext
branch
from
fa731b7
to
dbc0c43
Mar 17, 2018
SimonSapin
reviewed
Mar 17, 2018
| @@ -143,8 +142,6 @@ macro_rules! assert_all { | |||
| stringify!($what), b); | |||
| } | |||
| } | |||
| assert!($str.$what()); | |||
| assert!($str.as_bytes().$what()); | |||
This comment has been minimized.
This comment has been minimized.
SimonSapin
Mar 17, 2018
Author
Contributor
These methods are removed on str and [u8] in favor of explicit Iterator::all: #39658 (comment)
SimonSapin
added
the
S-waiting-on-review
label
Mar 17, 2018
Centril
added
the
relnotes
label
Mar 18, 2018
SimonSapin
assigned
alexcrichton
Mar 18, 2018
SimonSapin
added
the
T-libs
label
Mar 19, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Mar 19, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Mar 21, 2018
bors
added a commit
that referenced
this pull request
Mar 21, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r- Failed to build stage0-std on Windows.
|
bors
added
S-waiting-on-author
and removed
S-waiting-on-bors
labels
Mar 21, 2018
This comment has been minimized.
This comment has been minimized.
|
I had turned a trait impl into inherent methods, but forgot to make them public. Additional diff squashed into the commit just now: diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs
index 175107bdc4..78b2bb5fe6 100644
--- a/src/libstd/sys_common/wtf8.rs
+++ b/src/libstd/sys_common/wtf8.rs
@@ -871,21 +871,21 @@ impl Hash for Wtf8 {
}
impl Wtf8 {
- fn is_ascii(&self) -> bool {
+ pub fn is_ascii(&self) -> bool {
self.bytes.is_ascii()
}
- fn to_ascii_uppercase(&self) -> Wtf8Buf {
+ pub fn to_ascii_uppercase(&self) -> Wtf8Buf {
Wtf8Buf { bytes: self.bytes.to_ascii_uppercase() }
}
- fn to_ascii_lowercase(&self) -> Wtf8Buf {
+ pub fn to_ascii_lowercase(&self) -> Wtf8Buf {
Wtf8Buf { bytes: self.bytes.to_ascii_lowercase() }
}
- fn eq_ignore_ascii_case(&self, other: &Wtf8) -> bool {
+ pub fn eq_ignore_ascii_case(&self, other: &Wtf8) -> bool {
self.bytes.eq_ignore_ascii_case(&other.bytes)
}
- fn make_ascii_uppercase(&mut self) { self.bytes.make_ascii_uppercase() }
- fn make_ascii_lowercase(&mut self) { self.bytes.make_ascii_lowercase() }
+ pub fn make_ascii_uppercase(&mut self) { self.bytes.make_ascii_uppercase() }
+ pub fn make_ascii_lowercase(&mut self) { self.bytes.make_ascii_lowercase() }
}
#[cfg(test)] |
SimonSapin
force-pushed the
SimonSapin:deprecate-asciiext
branch
from
dbc0c43
to
c09b9f9
Mar 21, 2018
kennytm
added
S-waiting-on-review
and removed
S-waiting-on-author
labels
Mar 21, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors: r=alexcrichton |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Mar 21, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Mar 21, 2018
bors
added a commit
that referenced
this pull request
Mar 22, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Mar 22, 2018
bors
added a commit
that referenced
this pull request
Mar 22, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Mar 22, 2018
bors
added a commit
that referenced
this pull request
Mar 22, 2018
alexcrichton
merged commit c09b9f9
into
rust-lang:master
Mar 22, 2018
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
SimonSapin
deleted the
SimonSapin:deprecate-asciiext
branch
Mar 22, 2018
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.
SimonSapin commentedMar 17, 2018
The trait and some of its methods are stable and will remain.
Some of the newer methods are unstable and can be removed later.
Fixes #39658