From cd1aceb3d92eee7dd5551627d90d8c7627d8897f Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Fri, 11 Sep 2026 12:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=20rustfmt=20=E6=8A=98=E8=A1=8C?= =?UTF-8?q?=E9=80=80=E5=87=BA=E6=94=B6=E5=B0=BE=E7=94=A8=E4=BE=8B=EF=BC=9A?= =?UTF-8?q?=E7=BA=AF=E6=A0=BC=E5=BC=8F=EF=BC=8C=E6=97=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tests/project.rs:gui_exit_stops_the_preview_and_clears_the_stale_record 里 init_existing_html_project_at 那行超过 rustfmt 行宽(中文按双宽计),按 `cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml` 的结果折成两行。 - 用 cargo fmt(不是裸 rustfmt):裸 rustfmt 会把文件当模块根、跟随 mod 递归格式化整个模块树,本次已有人因此误改 50 个文件。 - 范围核对:`git diff --stat` 只有 apps/ai-game-creator-shell/src-tauri/src/tests/project.rs(1 file changed, 2 insertions(+), 1 deletion(-)),crate 里其余文件本来就是 rustfmt 干净的,未被牵连。 - 门禁:`cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check` 与 `... --manifest-path server-rs/Cargo.toml -- --check` 均 exit 0;`cargo check --locked --all-targets` exit 0;AGC 子集 1198 passed / 4 skipped / 0 failed;四条预览定向用例仍各 1 passed。 --- apps/ai-game-creator-shell/src-tauri/src/tests/project.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/tests/project.rs b/apps/ai-game-creator-shell/src-tauri/src/tests/project.rs index a06838883..721710027 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/tests/project.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/tests/project.rs @@ -4794,7 +4794,8 @@ fn replacing_preview_for_another_project_closes_the_previous_project_record() { #[test] fn gui_exit_stops_the_preview_and_clears_the_stale_record() { let root = unique_project_path(); - init_existing_html_project_at(&root, "project-1", "退出收尾预览记录测试").expect("project init"); + init_existing_html_project_at(&root, "project-1", "退出收尾预览记录测试") + .expect("project init"); let registry = PreviewRegistry::default(); let _preview = start_local_game_preview_at(&root, ®istry).expect("preview start");