collections: impl AsRef<[u8]> for String
This commit is contained in:
parent
aaa3641754
commit
093ebd5a62
@ -1057,6 +1057,14 @@ impl AsRef<str> for String {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl AsRef<[u8]> for String {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_bytes()
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> From<&'a str> for String {
|
||||
#[cfg(not(test))]
|
||||
|
Loading…
Reference in New Issue
Block a user