fix either fut bounds

This commit is contained in:
ibraheemdev 2021-04-21 11:48:19 -04:00
parent a65ecf9acf
commit 2f3725d136
1 changed files with 6 additions and 4 deletions

View File

@ -232,14 +232,16 @@ where
}, },
} }
impl<RF, RT, RE, LF, LT, LE, L, R> Future for EitherExtractFut<L, R> impl<R, RF, RE, L, LF, LE> Future for EitherExtractFut<L, R>
where where
L: FromRequest<Future = LF, Error = LE>, L: FromRequest<Future = LF, Error = LE>,
R: FromRequest<Future = RF, Error = RE>, R: FromRequest<Future = RF, Error = RE>,
LF: Future<Output = Result<LT, LE>> + 'static, LF: Future<Output = Result<L, LE>> + 'static,
RF: Future<Output = Result<RT, RE>> + 'static, RF: Future<Output = Result<R, RE>> + 'static,
LE: Into<Error>,
RE: Into<Error>,
{ {
type Output = Result<Either<LT, RT>, EitherExtractError<LE, RE>>; type Output = Result<Either<L, R>, EitherExtractError<LE, RE>>;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let mut this = self.project(); let mut this = self.project();