1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-21 05:05:44 +02:00

remove read buffer management api

This commit is contained in:
Nikolay Kim
2018-02-26 20:07:22 -08:00
parent 0ab8bc11f3
commit a344c3a02e
4 changed files with 134 additions and 127 deletions

View File

@@ -120,10 +120,10 @@ impl PayloadWriter for PayloadType {
}
#[inline]
fn capacity(&self) -> usize {
fn need_read(&self) -> bool {
match *self {
PayloadType::Sender(ref sender) => sender.capacity(),
PayloadType::Encoding(ref enc) => enc.capacity(),
PayloadType::Sender(ref sender) => sender.need_read(),
PayloadType::Encoding(ref enc) => enc.need_read(),
}
}
}
@@ -351,8 +351,9 @@ impl PayloadWriter for EncodedPayload {
}
}
fn capacity(&self) -> usize {
self.inner.capacity()
#[inline]
fn need_read(&self) -> bool {
self.inner.need_read()
}
}