diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 15:13:20 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-17 15:13:20 -0800 |
| commit | f492095eb4ac061f1b4898b92880095d23dc9c86 (patch) | |
| tree | 2526e476bf9f0e0cf3f144018074b3e7aa90507d /src/libstd/sys | |
| parent | 096b1052d0c67a5e935a17ebdb7cdecbb8622bbf (diff) | |
| parent | 235f35b0b724a38a5583112825d46f50c5dde980 (diff) | |
| download | rust-f492095eb4ac061f1b4898b92880095d23dc9c86.tar.gz rust-f492095eb4ac061f1b4898b92880095d23dc9c86.zip | |
rollup merge of #22024: alexcrichton/ascii
* Move the type parameter on the `AsciiExt` trait to an associated type named `Owned`. * Move `ascii::escape_default` to using an iterator. This is a breaking change due to the removal of the type parameter on the `AsciiExt` trait as well as the modifications to the `escape_default` function to returning an iterator. Manual implementations of `AsciiExt` (or `AsciiExt` bounds) should be adjusted to remove the type parameter and using the new `escape_default` should be relatively straightforward. [breaking-change]
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 6047f94b3b4..b610f6c370b 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -817,7 +817,9 @@ impl<'a, S: Writer + Hasher> Hash<S> for Wtf8 { } } -impl AsciiExt<Wtf8Buf> for Wtf8 { +impl AsciiExt for Wtf8 { + type Owned = Wtf8Buf; + fn is_ascii(&self) -> bool { self.bytes.is_ascii() } @@ -830,6 +832,9 @@ impl AsciiExt<Wtf8Buf> for Wtf8 { 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() } } #[cfg(test)] |
