mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
codec: use advance over split_to when data is not needed (#2198)
This commit is contained in:
@@ -494,7 +494,7 @@ impl LengthDelimitedCodec {
|
||||
let num_skip = self.builder.get_num_skip();
|
||||
|
||||
if num_skip > 0 {
|
||||
let _ = src.split_to(num_skip);
|
||||
src.advance(num_skip);
|
||||
}
|
||||
|
||||
// Ensure that the buffer has enough space to read the incoming
|
||||
|
||||
Reference in New Issue
Block a user