Forward OsStr::clone_into to the inner Vec
Despite OS differences, they're all just `Vec<u8>` inside, so we can just forward `clone_into` calls to that optimized implementation.
This commit is contained in:
parent
b80fa76ee0
commit
f854070bb8
4 changed files with 13 additions and 2 deletions
|
@ -173,6 +173,10 @@ impl Slice {
|
|||
Buf { inner: self.inner.to_vec() }
|
||||
}
|
||||
|
||||
pub fn clone_into(&self, buf: &mut Buf) {
|
||||
self.inner.clone_into(&mut buf.inner)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn into_box(&self) -> Box<Slice> {
|
||||
let boxed: Box<[u8]> = self.inner.into();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue