Skip to content

Commit

Permalink
Mark AsRef impls for String's Drain as stable.
Browse files Browse the repository at this point in the history
Trait implementations effectively can't be #[unstable].
  • Loading branch information
m-ou-se committed Sep 9, 2020
1 parent f5bb523 commit f2a3290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2481,14 +2481,14 @@ impl<'a> Drain<'a> {
}
}

#[unstable(feature = "string_drain_as_str", issue = "none")]
#[stable(feature = "string_drain_as_ref", since = "1.48.0")]
impl<'a> AsRef<str> for Drain<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}

#[unstable(feature = "string_drain_as_str", issue = "none")]
#[stable(feature = "string_drain_as_ref", since = "1.48.0")]
impl<'a> AsRef<[u8]> for Drain<'a> {
fn as_ref(&self) -> &[u8] {
self.as_str().as_bytes()
Expand Down

0 comments on commit f2a3290

Please sign in to comment.