mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
Use .advance() intead of .split_to()
This commit is contained in:
parent
cab73791ed
commit
0d3f9e74c5
@ -1,5 +1,7 @@
|
||||
# Changes
|
||||
|
||||
* Use `.advance()` intead of `.split_to()`
|
||||
|
||||
## [0.2.0] - 2019-12-10
|
||||
|
||||
* Use specific futures dependencies
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user