1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 14:30:36 +02: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

@ -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