Cargo fmt
This commit is contained in:
parent
8523e80e64
commit
cbaaf18cf5
1 changed files with 2 additions and 1 deletions
|
@ -50,7 +50,8 @@ impl ResourceList {
|
||||||
pub fn save(&self, path: impl AsRef<Path> + Debug) -> Result<(), ResourceSaveError> {
|
pub fn save(&self, path: impl AsRef<Path> + Debug) -> Result<(), ResourceSaveError> {
|
||||||
info!("Creating backup before writing...");
|
info!("Creating backup before writing...");
|
||||||
let path = path.as_ref();
|
let path = path.as_ref();
|
||||||
std::fs::rename(path, path.with_extension("bak")).map_err(ResourceSaveError::BackupFailed)?;
|
std::fs::rename(path, path.with_extension("bak"))
|
||||||
|
.map_err(ResourceSaveError::BackupFailed)?;
|
||||||
info!("Writing data to {path:?}...");
|
info!("Writing data to {path:?}...");
|
||||||
let file = std::fs::File::create(path).map_err(ResourceSaveError::FileOpen)?;
|
let file = std::fs::File::create(path).map_err(ResourceSaveError::FileOpen)?;
|
||||||
self.save_to_writer(file)
|
self.save_to_writer(file)
|
||||||
|
|
Loading…
Reference in a new issue