From 04b4240e0f6204d8579a3089a6e50d4d822f4b65 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 15 Jun 2023 23:28:31 -0700 Subject: [PATCH] cargo clippy --fix --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c5bc049..9339b35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -214,8 +214,7 @@ impl User { }; if cookies.get(TOKEN_EXPIRE_COOKIE) .map(|expire| expire.value().parse::()) - .map(Result::ok) - .flatten() + .and_then(Result::ok) .map_or(true, |timestamp| Utc::now().timestamp() >= timestamp) { cookies.remove_private(Cookie::named(TOKEN_COOKIE)); cookies.remove(Cookie::named(TOKEN_EXPIRE_COOKIE));