Skip to content

Commit 0e201e8

Browse files
authored
Update buf.rs
1 parent cd03960 commit 0e201e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/buf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl<T: Buf> Buf for BufList<T> {
7575
// Our inner buffer may have an optimized version of copy_to_bytes, and if the whole
7676
// request can be fulfilled by the front buffer, we can take advantage.
7777
match self.bufs.front_mut() {
78-
Some(front) if front.remaining() == len => self.bytes.pop_front().unwrap(),
78+
Some(front) if front.remaining() == len => self.bufs.pop_front().unwrap(),
7979
Some(front) if front.remaining() > len => front.copy_to_bytes(len),
8080
_ => {
8181
assert!(len <= self.remaining(), "`len` greater than remaining");

0 commit comments

Comments
 (0)