Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ impl Buf for Bytes {
}
}

fn copy_to_bytes(&mut self, len: usize) -> crate::Bytes {
fn copy_to_bytes(&mut self, len: usize) -> Self {
if len == self.remaining() {
core::mem::replace(self, Bytes::new())
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ impl Buf for BytesMut {
}
}

fn copy_to_bytes(&mut self, len: usize) -> crate::Bytes {
fn copy_to_bytes(&mut self, len: usize) -> Bytes {
self.split_to(len).freeze()
}
}
Expand Down Expand Up @@ -1110,7 +1110,7 @@ unsafe impl BufMut for BytesMut {
// Specialize these methods so they can skip checking `remaining_mut`
// and `advance_mut`.

fn put<T: crate::Buf>(&mut self, mut src: T)
fn put<T: Buf>(&mut self, mut src: T)
where
Self: Sized,
{
Expand Down