diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index ae41610c3..eb8620cf8 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -1,6 +1,6 @@ # Changes -## [1.0.xx] - 2019-12-xx +## [1.0.1] - 2019-12-xx ### Fixed diff --git a/actix-http/src/h1/decoder.rs b/actix-http/src/h1/decoder.rs index 6a40f41a7..e113fd52d 100644 --- a/actix-http/src/h1/decoder.rs +++ b/actix-http/src/h1/decoder.rs @@ -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 diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index 8a2a4f030..6f4c09915 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -8,7 +8,7 @@ use actix_codec::{AsyncRead, AsyncWrite, Decoder, Encoder, Framed, FramedParts}; use actix_rt::time::{delay_until, Delay, Instant}; use actix_service::Service; use bitflags::bitflags; -use bytes::BytesMut; +use bytes::{Buf, BytesMut}; use log::{error, trace}; use crate::body::{Body, BodySize, MessageBody, ResponseBody}; @@ -312,7 +312,7 @@ where } Poll::Pending => { if written > 0 { - let _ = self.write_buf.split_to(written); + self.write_buf.advance(written); } return Ok(true); } @@ -322,7 +322,7 @@ where if written == self.write_buf.len() { unsafe { self.write_buf.set_len(0) } } else { - let _ = self.write_buf.split_to(written); + self.write_buf.advance(written); } Ok(false) } diff --git a/actix-http/src/ws/frame.rs b/actix-http/src/ws/frame.rs index 3983534ee..3c70eb2bd 100644 --- a/actix-http/src/ws/frame.rs +++ b/actix-http/src/ws/frame.rs @@ -1,6 +1,6 @@ use std::convert::TryFrom; -use bytes::{BufMut, BytesMut}; +use bytes::{Buf, BufMut, BytesMut}; use log::debug; use rand; @@ -108,7 +108,7 @@ impl Parser { } // remove prefix - let _ = src.split_to(idx); + src.advance(idx); // no need for body if length == 0 {