1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 20:51:06 +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
* Use `.advance()` intead of `.split_to()`
## [0.2.0] - 2019-12-10
* Use specific futures dependencies

View File

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