mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-06 15:49:07 +02:00
io/storage: add JSON support
Bincode can't deal with a number of serde's features that would be desirable if we're using the same Serialize impls for generating JSON data for the viewer.
This commit is contained in:
parent
5d40d061a4
commit
c44f6ab859
3 changed files with 30 additions and 8 deletions
|
@ -148,6 +148,7 @@ impl<'a> SingleRegionProcessor<'a> {
|
|||
storage::write_file(
|
||||
&self.output_path,
|
||||
&self.processed_region,
|
||||
storage::Format::Bincode,
|
||||
REGION_FILE_META_VERSION,
|
||||
self.input_timestamp,
|
||||
)
|
||||
|
|
|
@ -105,7 +105,8 @@ impl<'a> TileRenderer<'a> {
|
|||
|
||||
region_loader
|
||||
.get_or_try_init(|| async {
|
||||
storage::read_file(&processed_path).context("Failed to load processed region data")
|
||||
storage::read_file(&processed_path, storage::Format::Bincode)
|
||||
.context("Failed to load processed region data")
|
||||
})
|
||||
.await
|
||||
.cloned()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue