From 92517ec5948e8479a8f06fdafe96932da4cf9b4a Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 16 Sep 2024 10:55:12 -0400 Subject: Pass through CookieJar encoding/decoding errors using its own types. This is mostly a style thing, the type stays `Infallible`, we're just less coupled to the specifics. --- src/login/extract/identity_token.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/login/extract/identity_token.rs b/src/login/extract/identity_token.rs index 3be3f09..c813324 100644 --- a/src/login/extract/identity_token.rs +++ b/src/login/extract/identity_token.rs @@ -52,7 +52,7 @@ impl FromRequestParts for IdentityToken where S: Send + Sync, { - type Rejection = Infallible; + type Rejection = >::Rejection; async fn from_request_parts(parts: &mut Parts, state: &S) -> Result { let cookies = CookieJar::from_request_parts(parts, state).await?; @@ -61,7 +61,7 @@ where } impl IntoResponseParts for IdentityToken { - type Error = Infallible; + type Error = ::Error; fn into_response_parts(self, res: ResponseParts) -> Result { let Self { cookies } = self; -- cgit v1.2.3