1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-28 15:57:47 +02:00

Use .advance() intead of .split_to()

This commit is contained in:
Nikolay Kim
2019-12-19 09:56:14 +06:00
parent 1732ae8c79
commit 8c54054844
4 changed files with 8 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ use std::mem::MaybeUninit;
use std::task::Poll;
use actix_codec::Decoder;
use bytes::{Bytes, BytesMut};
use bytes::{Buf, Bytes, BytesMut};
use http::header::{HeaderName, HeaderValue};
use http::{header, Method, StatusCode, Uri, Version};
use httparse;
@@ -477,7 +477,7 @@ macro_rules! byte (
($rdr:ident) => ({
if $rdr.len() > 0 {
let b = $rdr[0];
let _ = $rdr.split_to(1);
$rdr.advance(1);
b
} else {
return Poll::Pending