Skip to content

Commit 8758a1a

Browse files
authored
add inline for Vec::put_slice (#459)
1 parent 27a0f9c commit 8758a1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/buf/buf_mut.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,6 @@ unsafe impl BufMut for Vec<u8> {
10471047

10481048
// Specialize these methods so they can skip checking `remaining_mut`
10491049
// and `advance_mut`.
1050-
10511050
fn put<T: super::Buf>(&mut self, mut src: T)
10521051
where
10531052
Self: Sized,
@@ -1069,6 +1068,7 @@ unsafe impl BufMut for Vec<u8> {
10691068
}
10701069
}
10711070

1071+
#[inline]
10721072
fn put_slice(&mut self, src: &[u8]) {
10731073
self.extend_from_slice(src);
10741074
}

0 commit comments

Comments
 (0)