mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-06 15:49:07 +02:00
io/storage: split out inner part of read/write
Allow reusing the read/write logic without requiring control over the file open.
This commit is contained in:
parent
f0e0db63d3
commit
5d40d061a4
3 changed files with 31 additions and 24 deletions
|
@ -145,7 +145,7 @@ impl<'a> SingleRegionProcessor<'a> {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
storage::write(
|
||||
storage::write_file(
|
||||
&self.output_path,
|
||||
&self.processed_region,
|
||||
REGION_FILE_META_VERSION,
|
||||
|
|
|
@ -105,7 +105,7 @@ impl<'a> TileRenderer<'a> {
|
|||
|
||||
region_loader
|
||||
.get_or_try_init(|| async {
|
||||
storage::read(&processed_path).context("Failed to load processed region data")
|
||||
storage::read_file(&processed_path).context("Failed to load processed region data")
|
||||
})
|
||||
.await
|
||||
.cloned()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue