diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-09-16 10:55:12 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-09-16 11:03:04 -0400 |
| commit | 92517ec5948e8479a8f06fdafe96932da4cf9b4a (patch) | |
| tree | 77b12f2fb6aa3a7907ecd397bf7d79ccc8575844 /src | |
| parent | a48c19f8c933291a3e65a3143eabda03e8bf1ede (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/login/extract/identity_token.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<S> FromRequestParts<S> for IdentityToken where S: Send + Sync, { - type Rejection = Infallible; + type Rejection = <CookieJar as FromRequestParts<S>>::Rejection; async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> { let cookies = CookieJar::from_request_parts(parts, state).await?; @@ -61,7 +61,7 @@ where } impl IntoResponseParts for IdentityToken { - type Error = Infallible; + type Error = <CookieJar as IntoResponseParts>::Error; fn into_response_parts(self, res: ResponseParts) -> Result<ResponseParts, Self::Error> { let Self { cookies } = self; |
