Skip to content

Commit

Permalink
add inline for Vec::put_slice (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
laizy committed Dec 31, 2020
1 parent 27a0f9c commit 8758a1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/buf/buf_mut.rs
Expand Up @@ -1047,7 +1047,6 @@ unsafe impl BufMut for Vec<u8> {

// Specialize these methods so they can skip checking `remaining_mut`
// and `advance_mut`.

fn put<T: super::Buf>(&mut self, mut src: T)
where
Self: Sized,
Expand All @@ -1069,6 +1068,7 @@ unsafe impl BufMut for Vec<u8> {
}
}

#[inline]
fn put_slice(&mut self, src: &[u8]) {
self.extend_from_slice(src);
}
Expand Down

0 comments on commit 8758a1a

Please sign in to comment.