From 27572738500788fa3413e2ff6be56ce826b1bd0c Mon Sep 17 00:00:00 2001 From: Linghong Date: Wed, 9 Sep 2026 04:40:45 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=85=8D=E7=BD=AE=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A=E4=BB=A3=E7=A0=81=E7=9A=84Rust=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按rustfmt要求调整错误信息和测试断言换行 通过仓库check:rustfmt、编码和diff检查 --- apps/ai-game-creator-shell/src-tauri/src/config.rs | 5 ++++- .../src-tauri/src/tests/configuration.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/config.rs b/apps/ai-game-creator-shell/src-tauri/src/config.rs index 8f586dbde..c03fba4e4 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/config.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/config.rs @@ -3708,7 +3708,10 @@ pub(crate) fn write_game_creator_config_batch(writes: &[(PathBuf, String)]) -> R .map_err(|error| error.to_string()), }; if let Err(restore_error) = restored { - error.push_str(&format!(";恢复配置失败:{}: {restore_error}", path.display())); + error.push_str(&format!( + ";恢复配置失败:{}: {restore_error}", + path.display() + )); } } return Err(error); diff --git a/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs b/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs index 65e8520b4..e1e91b5fd 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/tests/configuration.rs @@ -832,7 +832,10 @@ fn app_config_batch_restores_main_when_overlay_write_fails() { } else { assert!(!main.exists()); } - assert_eq!(fs::read_to_string(&overlay).expect("unchanged overlay"), original); + assert_eq!( + fs::read_to_string(&overlay).expect("unchanged overlay"), + original + ); fs::remove_dir_all(root).expect("cleanup config dir"); } }