diff --git a/src/config.rs b/src/config.rs index 08a0bc4..b2cf8e1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -61,7 +61,7 @@ pub fn load_dates_from_cache(cache_file: &str) -> Result, u64>) -> Result<()> { - let json = serde_json::to_string(&dates)?; + let json = serde_json::to_string_pretty(&dates)?; fs::write(cache_file, json.as_bytes())?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index 1d5d7e6..09ad864 100644 --- a/src/main.rs +++ b/src/main.rs @@ -163,7 +163,7 @@ async fn run() -> Result<()> { // Write out the cache file if necessary. if !args.dry_run && cache_changed { - let json = serde_json::to_string(&post_cache)?; + let json = serde_json::to_string_pretty(&post_cache)?; fs::write(post_cache_file, json.as_bytes())?; }