From 595cda541d975fdbb092d16c258d653a2bb5b58f Mon Sep 17 00:00:00 2001 From: Zyy Date: Mon, 6 Jul 2026 17:55:54 +0800 Subject: [PATCH] style: apply cargo fmt Co-authored-by: Codex --- backend/src/runtime/tasks/quota_refresh.rs | 2 +- backend/src/upstream/accounts/quota/runtime.rs | 2 +- backend/tests/upstream/accounts/quota_refresh.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/runtime/tasks/quota_refresh.rs b/backend/src/runtime/tasks/quota_refresh.rs index f2280c0dc..ff6fdcc94 100644 --- a/backend/src/runtime/tasks/quota_refresh.rs +++ b/backend/src/runtime/tasks/quota_refresh.rs @@ -17,7 +17,7 @@ use crate::{ use super::{ coordinator::SchedulerHandle, - periodic::{PeriodicTaskConfig, PeriodicTaskRunner, spawn_periodic_task}, + periodic::{spawn_periodic_task, PeriodicTaskConfig, PeriodicTaskRunner}, }; /// 主动配额刷新后台任务。 diff --git a/backend/src/upstream/accounts/quota/runtime.rs b/backend/src/upstream/accounts/quota/runtime.rs index 678aad811..267856906 100644 --- a/backend/src/upstream/accounts/quota/runtime.rs +++ b/backend/src/upstream/accounts/quota/runtime.rs @@ -4,7 +4,7 @@ use std::{collections::HashMap, sync::Arc, time::Duration}; use chrono::Utc; use thiserror::Error; -use tokio::time::{Instant, sleep}; +use tokio::time::{sleep, Instant}; use tracing::warn; use crate::upstream::accounts::{ diff --git a/backend/tests/upstream/accounts/quota_refresh.rs b/backend/tests/upstream/accounts/quota_refresh.rs index 1edb3ab43..f663ae4e3 100644 --- a/backend/tests/upstream/accounts/quota_refresh.rs +++ b/backend/tests/upstream/accounts/quota_refresh.rs @@ -5,16 +5,16 @@ use codex_proxy_rs::infra::database::connect_sqlite; use codex_proxy_rs::upstream::accounts::cookies::SqliteCookieStore; use codex_proxy_rs::upstream::accounts::model::AccountStatus; use codex_proxy_rs::upstream::accounts::quota::{ - RuntimeQuotaRefreshService, quota_from_usage, quota_snapshot_limit_reached, - quota_snapshot_limit_window_seconds, quota_snapshot_reset_at, + quota_from_usage, quota_snapshot_limit_reached, quota_snapshot_limit_window_seconds, + quota_snapshot_reset_at, RuntimeQuotaRefreshService, }; use codex_proxy_rs::upstream::accounts::store::{NewAccount, SqliteAccountStore}; use codex_proxy_rs::upstream::transport::CodexBackendClient; use secrecy::SecretString; -use serde_json::{Value, json}; +use serde_json::{json, Value}; use wiremock::{ - Mock, MockServer, ResponseTemplate, matchers::{method, path}, + Mock, MockServer, ResponseTemplate, }; #[test]