1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-30 17:44:34 +01:00

Use .advance() intead of .split_to()

This commit is contained in:
Nikolay Kim 2019-12-19 09:50:31 +06:00
parent cab73791ed
commit 0d3f9e74c5
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Changes # Changes
* Use `.advance()` intead of `.split_to()`
## [0.2.0] - 2019-12-10 ## [0.2.0] - 2019-12-10
* Use specific futures dependencies * Use specific futures dependencies

View File

@ -2,7 +2,7 @@ use std::pin::Pin;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use std::{fmt, io}; use std::{fmt, io};
use bytes::BytesMut; use bytes::{Buf, BytesMut};
use futures_core::{ready, Stream}; use futures_core::{ready, Stream};
use futures_sink::Sink; use futures_sink::Sink;
@ -288,7 +288,7 @@ impl<T, U> Framed<T, U> {
} }
// remove written data // remove written data
let _ = self.write_buf.split_to(n); self.write_buf.advance(n);
} }
// Try flushing the underlying IO // Try flushing the underlying IO