From f45137ad6d362d2e13b853e19f2ba9de1358c133 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 9 Dec 2019 13:03:43 -0800 Subject: [PATCH] refactor(server): remove deprecated API --- src/server/conn.rs | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/server/conn.rs b/src/server/conn.rs index 689b2308..f6b9103e 100644 --- a/src/server/conn.rs +++ b/src/server/conn.rs @@ -15,7 +15,6 @@ use std::mem; use std::net::SocketAddr; use bytes::Bytes; -use futures_core::Stream; use pin_project::{pin_project, project}; use tokio::io::{AsyncRead, AsyncWrite}; @@ -81,7 +80,7 @@ enum ConnectionMode { #[must_use = "streams do nothing unless polled"] #[pin_project] #[derive(Debug)] -pub struct Serve { +pub(super) struct Serve { #[pin] incoming: I, make_service: S, @@ -632,11 +631,13 @@ impl Serve { &self.incoming } + /* /// Get a mutable reference to the incoming stream. #[inline] pub fn incoming_mut(&mut self) -> &mut I { &mut self.incoming } + */ /// Spawn all incoming connections onto the executor in `Http`. pub(super) fn spawn_all(self) -> SpawnAll { @@ -680,23 +681,6 @@ where } } -// deprecated -impl Stream for Serve -where - I: Accept, - IO: AsyncRead + AsyncWrite + Unpin, - IE: Into>, - S: MakeServiceRef, - B: Payload, - E: H2Exec<>::Future, B>, -{ - type Item = crate::Result>; - - fn poll_next(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll> { - self.poll_next_(cx) - } -} - // ===== impl Connecting ===== impl Future for Connecting