Skip to content

Commit 23d9b7c

Browse files
committed
cargo fmt
1 parent 386450f commit 23d9b7c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/middleware/token_auth.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ impl<'r> FromRequest<'r> for TokenAuth {
5353

5454
match db.transaction(|conn| {
5555
if let Ok(token) = conn.get_token(PlainToken::from(token.to_string())) {
56-
if token.expires_at.is_none_or(|expires_at| {
57-
expires_at > DateTime::<Utc>::from(SystemTime::now())
58-
}) {
56+
if token
57+
.expires_at
58+
.is_none_or(|expires_at| expires_at > DateTime::<Utc>::from(SystemTime::now()))
59+
{
5960
Ok(TokenAuth { token })
6061
} else {
6162
Err(TokenAuthError::Expired)

0 commit comments

Comments
 (0)