Skip to content

Commit

Permalink
Add tracking issue number for string_drain_as_str.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Sep 19, 2020
1 parent 829019d commit 15eb638
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2475,21 +2475,21 @@ impl<'a> Drain<'a> {
/// let _ = drain.next().unwrap();
/// assert_eq!(drain.as_str(), "bc");
/// ```
#[unstable(feature = "string_drain_as_str", issue = "none")] // Note: uncomment AsRef impls below when stabilizing.
#[unstable(feature = "string_drain_as_str", issue = "76905")] // Note: uncomment AsRef impls below when stabilizing.
pub fn as_str(&self) -> &str {
self.iter.as_str()
}
}

// Uncomment when stabilizing `string_drain_as_str`.
// #[unstable(feature = "string_drain_as_str", issue = "none")]
// #[unstable(feature = "string_drain_as_str", issue = "76905")]
// impl<'a> AsRef<str> for Drain<'a> {
// fn as_ref(&self) -> &str {
// self.as_str()
// }
// }
//
// #[unstable(feature = "string_drain_as_str", issue = "none")]
// #[unstable(feature = "string_drain_as_str", issue = "76905")]
// impl<'a> AsRef<[u8]> for Drain<'a> {
// fn as_ref(&self) -> &[u8] {
// self.as_str().as_bytes()
Expand Down

0 comments on commit 15eb638

Please sign in to comment.