From 39609d3534727ae0ef8bbc0f9f02568b091cdd1d Mon Sep 17 00:00:00 2001 From: kvillers Date: Thu, 30 Apr 2026 15:34:35 +0200 Subject: [PATCH] Update main.rs --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 489ace4..edd0010 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ -use std::fs; use std::error::Error; +use std::fs; mod template; use template::antares::Antares; @@ -36,10 +36,14 @@ fn main() -> Result<(), Box> { if let Ok(json_val) = serde_json::from_str::(&response) { let pretty = serde_json::to_string_pretty(&json_val)?; fs::write("antares.json", pretty)?; - eprintln!("Warning: response didn't match expected struct but was valid JSON; saved pretty JSON to antares.json"); + eprintln!( + "Warning: response didn't match expected struct but was valid JSON; saved pretty JSON to antares.json" + ); } else { fs::write("antares.json", &response)?; - eprintln!("Warning: response is not valid JSON; saved raw response to antares.json"); + eprintln!( + "Warning: response is not valid JSON; saved raw response to antares.json" + ); } Vec::new() }