Skip to content

Commit

Permalink
Rollup merge of rust-lang#32020 - alexcrichton:stabilize-into-ascii, …
Browse files Browse the repository at this point in the history
…r=brson

These were intended to land in stable 1.8 but were just waiting for the
implementation PR, so now they're landing. Specifically this PR stabilizes:

* `AsciiExt::into_ascii_uppercase`
* `AsciiExt::into_ascii_lowercase`
* `AsciiExt for Vec<u8>`
* `AsciiExt for String`
  • Loading branch information
Manishearth committed Mar 4, 2016
2 parents d5b66f7 + 48fd993 commit a8a42c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libstd/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub trait AsciiExt {
///
/// assert_eq!(upper, "A");
/// ```
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
fn into_ascii_uppercase(self) -> Self::Owned where Self: Sized {
self.to_ascii_uppercase()
}
Expand All @@ -202,15 +202,15 @@ pub trait AsciiExt {
///
/// assert_eq!(lower, "a");
/// ```
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
fn into_ascii_lowercase(self) -> Self::Owned where Self: Sized {
self.to_ascii_lowercase()
}
}

/// Implement `into_ascii_lowercase` and `into_ascii_uppercase` without memory allocation,
/// defer other methods to `str`.
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
impl AsciiExt for String {
type Owned = Self;

Expand Down Expand Up @@ -242,7 +242,7 @@ impl AsciiExt for String {

/// Implement `into_ascii_lowercase` and `into_ascii_uppercase` without memory allocation,
/// defer other methods to `[u8]`.
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
impl AsciiExt for Vec<u8> {
type Owned = Self;

Expand Down

0 comments on commit a8a42c3

Please sign in to comment.