From 09a2320e64dc619ae980e67c6101095426d47ba3 Mon Sep 17 00:00:00 2001 From: Artem <91075334+Mffff4@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:57:19 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20violations=20=E2=80=94=20add=20safe?= =?UTF-8?q?ty=20comment=20on=20expect,=20fix=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add '// safety: hardcoded literal' to regex .expect() to satisfy the no-panic-in-prod CI check - Fix cargo fmt whitespace in collapsible if-let chain --- src/llm/gemini_oauth.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/llm/gemini_oauth.rs b/src/llm/gemini_oauth.rs index 05f55fa5..9def8e29 100644 --- a/src/llm/gemini_oauth.rs +++ b/src/llm/gemini_oauth.rs @@ -368,8 +368,7 @@ impl CredentialManager { Ok(mut new_cred) => { // Preserve or discover project_id after token refresh if new_cred.project_id.is_none() - && let Some(pid) = - self.discover_project_id(&new_cred.access_token).await + && let Some(pid) = self.discover_project_id(&new_cred.access_token).await { new_cred.project_id = Some(pid); } @@ -1549,7 +1548,7 @@ impl GeminiOauthProvider { static RE: LazyLock = LazyLock::new(|| { regex::Regex::new(r"reset after (?:(\d+)h)?(?:(\d+)m)?(\d+)s") - .expect("invalid retry_after regex") + .expect("invalid retry_after regex") // safety: hardcoded literal }); let caps = RE.captures(message)?;