Skip to content

Commit

Permalink
Change unused BytesMut::split_to to advance
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jan 29, 2020
1 parent 74d0293 commit 8ca2eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hpack/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ fn take(buf: &mut Cursor<&mut BytesMut>, n: usize) -> Bytes {
let pos = buf.position() as usize;
let mut head = buf.get_mut().split_to(pos + n);
buf.set_position(0);
head.split_to(pos);
head.advance(pos);
head.freeze()
}

Expand Down

0 comments on commit 8ca2eb2

Please sign in to comment.