mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-26 00:00:20 +02:00
add inline for Vec::put_slice (#459)
This commit is contained in:
+1
-1
@@ -1047,7 +1047,6 @@ unsafe impl BufMut for Vec<u8> {
|
|||||||
|
|
||||||
// Specialize these methods so they can skip checking `remaining_mut`
|
// Specialize these methods so they can skip checking `remaining_mut`
|
||||||
// and `advance_mut`.
|
// and `advance_mut`.
|
||||||
|
|
||||||
fn put<T: super::Buf>(&mut self, mut src: T)
|
fn put<T: super::Buf>(&mut self, mut src: T)
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
@@ -1069,6 +1068,7 @@ unsafe impl BufMut for Vec<u8> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn put_slice(&mut self, src: &[u8]) {
|
fn put_slice(&mut self, src: &[u8]) {
|
||||||
self.extend_from_slice(src);
|
self.extend_from_slice(src);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user