From c19ada4bec90b14dcae591be2f6c2820c16ca299 Mon Sep 17 00:00:00 2001 From: itsscb Date: Tue, 29 Oct 2024 22:40:27 +0100 Subject: [PATCH] feat: prettyfy json --- src/library.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(())