From c5f61214b6d74716505505cc09e2c8d716132910 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Thu, 15 Sep 2022 22:15:05 +0200 Subject: [PATCH] remove shared git --- tower/src/lib.rs | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 9d93691..bd87523 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -1,9 +1,7 @@ -// #![allow(warnings)] - pub mod balance; use futures_core::TryStream; -use std::{convert::Infallible, future::Future}; +use std::future::Future; pub trait Sealed {} /// Alias for a type-erased error type. @@ -17,7 +15,7 @@ mod load { } pub trait Discover { - type Key: Eq; + type Key; type Service; type Error; } @@ -52,37 +50,6 @@ pub trait Service { type Future: Future>; } -pub struct Shared { - service: S, -} - -impl Service for Shared -where - S: Clone, -{ - type Response = S; - type Error = Infallible; - type Future = SharedFuture; -} - -pub struct SharedFuture { - _s: S, -} - -impl std::future::Future for SharedFuture -where - std::future::Ready>: std::future::Future, -{ - type Output = > as std::future::Future>::Output; - - fn poll( - self: std::pin::Pin<&mut Self>, - _: &mut std::task::Context<'_>, - ) -> std::task::Poll { - todo!() - } -} - pub trait MakeService { type Response; type Error;