From f9c343eb07472ca7928376d1bb4aa19c65c0d178 Mon Sep 17 00:00:00 2001 From: MMEXA Date: Sat, 18 Jul 2026 05:55:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(gateway):=20=E9=80=82=E9=85=8D=20Rust=201.9?= =?UTF-8?q?5=20=E6=95=B4=E9=99=A4=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/aether-gateway/src/handlers/shared/catalog.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/aether-gateway/src/handlers/shared/catalog.rs b/apps/aether-gateway/src/handlers/shared/catalog.rs index 94fbcea51..98b098c1f 100644 --- a/apps/aether-gateway/src/handlers/shared/catalog.rs +++ b/apps/aether-gateway/src/handlers/shared/catalog.rs @@ -821,11 +821,11 @@ fn codex_quota_period_identity(window_minutes: u64) -> (String, String) { return ("monthly".to_string(), "月".to_string()); } - let label = if window_minutes % MINUTES_PER_WEEK == 0 { + let label = if window_minutes.is_multiple_of(MINUTES_PER_WEEK) { format!("{}周", window_minutes / MINUTES_PER_WEEK) - } else if window_minutes % MINUTES_PER_DAY == 0 { + } else if window_minutes.is_multiple_of(MINUTES_PER_DAY) { format!("{}天", window_minutes / MINUTES_PER_DAY) - } else if window_minutes % MINUTES_PER_HOUR == 0 { + } else if window_minutes.is_multiple_of(MINUTES_PER_HOUR) { format!("{}H", window_minutes / MINUTES_PER_HOUR) } else { format!("{window_minutes}分钟")