diff --git a/src/library.rs b/src/library.rs index a1b23fa..ec68cb8 100644 --- a/src/library.rs +++ b/src/library.rs @@ -29,7 +29,7 @@ impl Library { /// /// Returns an `Error` if there was an error writing the library to the file. pub fn save_to_file>(&self, file_path: P) -> Result<(), Error> { - let serialized = serde_json::to_string(self)?; + let serialized = serde_json::to_string_pretty(self)?; let mut file = File::create(file_path.as_ref())?; file.write_all(serialized.as_bytes())?; Ok(())