Remove deprecated-in-0.1.x APIs
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
// Until tokio-rs/tokio#680 is fixed
|
|
||||||
#![allow(deprecated)]
|
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
mod framed_read;
|
mod framed_read;
|
||||||
mod framed_write;
|
mod framed_write;
|
||||||
|
|||||||
@@ -93,10 +93,12 @@ impl Deque {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
pub fn peek_front<'a, T>(&self, buf: &'a Buffer<T>) -> Option<&'a T> {
|
pub fn peek_front<'a, T>(&self, buf: &'a Buffer<T>) -> Option<&'a T> {
|
||||||
match self.indices {
|
match self.indices {
|
||||||
Some(idxs) => Some(&buf.slab[idxs.head].value),
|
Some(idxs) => Some(&buf.slab[idxs.head].value),
|
||||||
None => None,
|
None => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -456,18 +456,6 @@ impl Recv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn body_is_empty(&self, stream: &store::Ptr) -> bool {
|
|
||||||
if !stream.state.is_recv_closed() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
stream
|
|
||||||
.pending_recv
|
|
||||||
.peek_front(&self.buffer)
|
|
||||||
.map(|event| !event.is_data())
|
|
||||||
.unwrap_or(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_end_stream(&self, stream: &store::Ptr) -> bool {
|
pub fn is_end_stream(&self, stream: &store::Ptr) -> bool {
|
||||||
if !stream.state.is_recv_closed() {
|
if !stream.state.is_recv_closed() {
|
||||||
return false;
|
return false;
|
||||||
@@ -1050,17 +1038,6 @@ impl Recv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===== impl Event =====
|
|
||||||
|
|
||||||
impl Event {
|
|
||||||
fn is_data(&self) -> bool {
|
|
||||||
match *self {
|
|
||||||
Event::Data(..) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== impl Open =====
|
// ===== impl Open =====
|
||||||
|
|
||||||
impl Open {
|
impl Open {
|
||||||
|
|||||||
@@ -1104,15 +1104,6 @@ impl OpaqueStreamRef {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn body_is_empty(&self) -> bool {
|
|
||||||
let mut me = self.inner.lock().unwrap();
|
|
||||||
let me = &mut *me;
|
|
||||||
|
|
||||||
let stream = me.store.resolve(self.key);
|
|
||||||
|
|
||||||
me.actions.recv.body_is_empty(&stream)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_end_stream(&self) -> bool {
|
pub fn is_end_stream(&self) -> bool {
|
||||||
let mut me = self.inner.lock().unwrap();
|
let mut me = self.inner.lock().unwrap();
|
||||||
let me = &mut *me;
|
let me = &mut *me;
|
||||||
|
|||||||
@@ -405,15 +405,6 @@ where
|
|||||||
self.connection.poll(cx).map_err(Into::into)
|
self.connection.poll(cx).map_err(Into::into)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
note = "use abrupt_shutdown or graceful_shutdown instead",
|
|
||||||
since = "0.1.4"
|
|
||||||
)]
|
|
||||||
#[doc(hidden)]
|
|
||||||
pub fn close_connection(&mut self) {
|
|
||||||
self.graceful_shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Sets the connection to a GOAWAY state.
|
/// Sets the connection to a GOAWAY state.
|
||||||
///
|
///
|
||||||
/// Does not terminate the connection. Must continue being polled to close
|
/// Does not terminate the connection. Must continue being polled to close
|
||||||
|
|||||||
@@ -400,13 +400,6 @@ impl RecvStream {
|
|||||||
RecvStream { inner }
|
RecvStream { inner }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deprecated(since = "0.0.0")]
|
|
||||||
#[doc(hidden)]
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
// If the recv side is closed and the receive queue is empty, the body is empty.
|
|
||||||
self.inner.inner.body_is_empty()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the receive half has reached the end of stream.
|
/// Returns true if the receive half has reached the end of stream.
|
||||||
///
|
///
|
||||||
/// A return value of `true` means that calls to `poll` and `poll_trailers`
|
/// A return value of `true` means that calls to `poll` and `poll_trailers`
|
||||||
|
|||||||
Reference in New Issue
Block a user