mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Add AsRef<[u8]> for String's Drain.
This commit is contained in:
parent
673284058b
commit
f5bb523e94
@ -2488,6 +2488,13 @@ impl<'a> AsRef<str> for Drain<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "string_drain_as_str", issue = "none")]
|
||||
impl<'a> AsRef<[u8]> for Drain<'a> {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.as_str().as_bytes()
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "drain", since = "1.6.0")]
|
||||
impl Iterator for Drain<'_> {
|
||||
type Item = char;
|
||||
|
Loading…
Reference in New Issue
Block a user