From c71413f2f7864382919e401ef5b5587776877050 Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 7 Mar 2023 17:30:44 +0100 Subject: [PATCH] loop --- hyper/src/server/accept.rs | 5 +---- hyper/src/server/server.rs | 9 ++++----- hyper/src/upgrade.rs | 18 ------------------ 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/hyper/src/server/accept.rs b/hyper/src/server/accept.rs index 56c54ff..d28ad9a 100644 --- a/hyper/src/server/accept.rs +++ b/hyper/src/server/accept.rs @@ -5,10 +5,7 @@ //! - The [`Accept`](Accept) trait used to asynchronously accept incoming //! connections. //! - Utilities like `poll_fn` to ease creating a custom `Accept`. -use crate::common::{ - task::{self, Poll}, - Pin, -}; + #[cfg(feature = "stream")] use futures_core::Stream; #[cfg(feature = "stream")] diff --git a/hyper/src/server/server.rs b/hyper/src/server/server.rs index 396e001..1a74f04 100644 --- a/hyper/src/server/server.rs +++ b/hyper/src/server/server.rs @@ -3,15 +3,14 @@ use super::accept::Accept; use super::conn::Http as Http_; #[cfg(all(feature = "tcp"))] use super::tcp::AddrIncoming; -use crate::body::{Body, HttpBody}; +use crate::body::Body; use crate::common::exec::Exec; -use crate::common::exec::{ConnStreamExec, NewSvcExec}; -use crate::common::{task, Future, Pin, Poll, Unpin}; +use crate::common::exec::NewSvcExec; +use crate::common::{task, Future, Pin, Poll}; use crate::service::{HttpService, MakeServiceRef}; -use pin_project_lite::pin_project; use std::error::Error as StdError; #[cfg(feature = "tcp")] -use tokio::io::{AsyncRead, AsyncWrite}; + pub struct Server { incoming: I, make_service: S, diff --git a/hyper/src/upgrade.rs b/hyper/src/upgrade.rs index c633341..a43e727 100644 --- a/hyper/src/upgrade.rs +++ b/hyper/src/upgrade.rs @@ -104,24 +104,6 @@ pub(super) struct Pending { pub(super) fn pending() -> (Pending, OnUpgrade) { loop {} } -impl Upgraded { - #[cfg(any(feature = "http1", feature = "http2", test))] - pub(super) fn new(io: T, read_buf: Bytes) -> Self - where - T: AsyncRead + AsyncWrite + Unpin + Send + 'static, - { - loop {} - } - - - - - pub(crate) fn downcast( - self, - ) -> Result, Self> { - loop {} - } -} impl AsyncRead for Upgraded { fn poll_read( mut self: Pin<&mut Self>,