From 55286e4b0103c1505ff89c186b098e731a32c819 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Thu, 15 Sep 2022 23:08:00 +0200 Subject: [PATCH] smol --- tower/src/lib.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tower/src/lib.rs b/tower/src/lib.rs index e969727..b86aaa0 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -8,7 +8,7 @@ trait TryStream: Stream { impl TryStream for S where - S: ?Sized + Stream, + S: Stream, { type TryItem = T; } @@ -56,22 +56,14 @@ impl Stream for MS where MS: MakeService, { - type Item = SvcWrap; + type Item = MS::Service; } -pub fn broken() +pub fn broken(ms: MS) where MS: MakeService, MS::Error: Into<()>, { - let d: MS = todo!(); - // Error: Apparently Balance::new doesn't exist during MIR validation - let _ = Balance::new(d); -} - -struct SvcWrap(Svc); - -impl> Service for SvcWrap { - type Error = Svc::Error; + let _ = Balance::::new(ms); }