修正配置回滚代码的Rust格式
Project CI / Repository checks (pull_request) Successful in 2m51s
Project CI / Frontend tests (pull_request) Successful in 3m18s
Project CI / Native shell tests (pull_request) Successful in 22m8s
Project CI / Backend tests (pull_request) Successful in 8m9s

按rustfmt要求调整错误信息和测试断言换行
通过仓库check:rustfmt、编码和diff检查
This commit is contained in:
2026-09-09 04:40:45 +00:00
parent 08c5917490
commit 2757273850
2 changed files with 8 additions and 2 deletions
@@ -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);
@@ -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");
}
}