X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/606f82c76540a9d80366fdb943c06abe525f662e..refs/heads/rust:/src/command/update.rs diff --git a/src/command/update.rs b/src/command/update.rs index 3796df2..67cc462 100644 --- a/src/command/update.rs +++ b/src/command/update.rs @@ -5,6 +5,7 @@ use super::{sync_down::SyncDown, generate::Generate, sync_up::SyncUp}; use crate::configuration::Configuration; use crate::constants::METADATA_FILENAME; use crate::metadata::Metadata; +use serde_json; pub struct Update; @@ -23,7 +24,7 @@ impl Update { } fn write_metadata(&self, metadata: &Metadata, metadata_location: &PathBuf) -> Result<()> { - let serialized_metadata = metadata.serialize(); + let serialized_metadata = serde_json::to_string(&metadata)?; write(metadata_location, serialized_metadata)?; Ok(()) }