From efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 01:16:50 +0900 Subject: refactor: auto-fix clippy warnings --- crates/shirabe/src/util/gitlab.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/src/util/gitlab.rs') diff --git a/crates/shirabe/src/util/gitlab.rs b/crates/shirabe/src/util/gitlab.rs index 3938a07..86b7620 100644 --- a/crates/shirabe/src/util/gitlab.rs +++ b/crates/shirabe/src/util/gitlab.rs @@ -478,18 +478,14 @@ impl GitLab { pub fn is_oauth_expired(&self, origin_url: &str) -> bool { let auth_tokens = self.config.borrow_mut().get("gitlab-oauth"); - if let Some(map) = auth_tokens.as_array() { - if let Some(token_info) = map.get(origin_url) { - if let Some(token_map) = token_info.as_array() { - if let Some(expires_at) = token_map.get("expires-at") { - if let Some(expires_at_int) = expires_at.as_int() { - if expires_at_int < time() { - return true; - } - } - } - } - } + if let Some(map) = auth_tokens.as_array() + && let Some(token_info) = map.get(origin_url) + && let Some(token_map) = token_info.as_array() + && let Some(expires_at) = token_map.get("expires-at") + && let Some(expires_at_int) = expires_at.as_int() + && expires_at_int < time() + { + return true; } false -- cgit v1.3.1