Update to rocket master (#147)

Merge branch 'master' into rocket

Update to rocket master

Co-authored-by: timokoesters <timo@koesters.xyz>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/147
This commit is contained in:
Timo Kösters 2020-07-14 18:23:26 +02:00
parent 469071e105
commit b9de21949d
5 changed files with 401 additions and 32 deletions

View file

@ -46,13 +46,13 @@ impl Error {
}
}
#[rocket::async_trait]
impl<'r> Responder<'r> for Error {
async fn respond_to(self, r: &'r Request<'_>) -> response::Result<'r> {
impl<'r, 'o> Responder<'r, 'o> for Error
where
'o: 'r,
{
fn respond_to(self, r: &'r Request<'_>) -> response::Result<'o> {
if let Self::Uiaa(uiaainfo) = &self {
return RumaResponse::from(UiaaResponse::AuthResponse(uiaainfo.clone()))
.respond_to(r)
.await;
return RumaResponse::from(UiaaResponse::AuthResponse(uiaainfo.clone())).respond_to(r);
}
let message = format!("{}", self);
@ -83,6 +83,5 @@ impl<'r> Responder<'r> for Error {
status_code,
})
.respond_to(r)
.await
}
}