diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 01:16:50 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 02:22:41 +0900 |
| commit | efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 (patch) | |
| tree | a62bbba72324de48be5f8e689559f8d9e288fc61 /crates/shirabe/src/util/gitlab.rs | |
| parent | cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 (diff) | |
| download | php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.gz php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.tar.zst php-shirabe-efec43b3b8827820cf35fe1b73d8e33f5fe84eb4.zip | |
refactor: auto-fix clippy warnings
Diffstat (limited to 'crates/shirabe/src/util/gitlab.rs')
| -rw-r--r-- | crates/shirabe/src/util/gitlab.rs | 20 |
1 files changed, 8 insertions, 12 deletions
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 |
