修正配置回滚代码的Rust格式
按rustfmt要求调整错误信息和测试断言换行 通过仓库check:rustfmt、编码和diff检查
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user