diff options
Diffstat (limited to 'src/login/extract/identity_token.rs')
| -rw-r--r-- | src/login/extract/identity_token.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/login/extract/identity_token.rs b/src/login/extract/identity_token.rs index c322f7b..3be3f09 100644 --- a/src/login/extract/identity_token.rs +++ b/src/login/extract/identity_token.rs @@ -31,7 +31,7 @@ impl IdentityToken { .permanent() .build(); - IdentityToken { + Self { cookies: self.cookies.add(identity_cookie), } } @@ -39,7 +39,7 @@ impl IdentityToken { /// Remove the identity secret and ensure that it will be cleared when this /// extractor is included in a response. pub fn clear(self) -> Self { - IdentityToken { + Self { cookies: self.cookies.remove(IDENTITY_COOKIE), } } @@ -56,7 +56,7 @@ where async fn from_request_parts(parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> { let cookies = CookieJar::from_request_parts(parts, state).await?; - Ok(IdentityToken { cookies }) + Ok(Self { cookies }) } } @@ -64,7 +64,7 @@ impl IntoResponseParts for IdentityToken { type Error = Infallible; fn into_response_parts(self, res: ResponseParts) -> Result<ResponseParts, Self::Error> { - let IdentityToken { cookies } = self; + let Self { cookies } = self; cookies.into_response_parts(res) } } |
