This commit is contained in:
nora 2022-09-15 23:08:00 +02:00
parent 6db8f7942b
commit 55286e4b01

View file

@ -8,7 +8,7 @@ trait TryStream: Stream {
impl<S, T> TryStream for S impl<S, T> TryStream for S
where where
S: ?Sized + Stream<Item = T>, S: Stream<Item = T>,
{ {
type TryItem = T; type TryItem = T;
} }
@ -56,22 +56,14 @@ impl<MS> Stream for MS
where where
MS: MakeService, MS: MakeService,
{ {
type Item = SvcWrap<MS::Service>; type Item = MS::Service;
} }
pub fn broken<MS>() pub fn broken<MS>(ms: MS)
where where
MS: MakeService, MS: MakeService,
MS::Error: Into<()>, MS::Error: Into<()>,
{ {
let d: MS = todo!();
// Error: Apparently Balance::new doesn't exist during MIR validation // Error: Apparently Balance::new doesn't exist during MIR validation
let _ = Balance::new(d); let _ = Balance::<MS, ()>::new(ms);
}
struct SvcWrap<Svc>(Svc);
impl<Request, Svc: Service<Request>> Service<Request> for SvcWrap<Svc> {
type Error = Svc::Error;
} }