fix: Make clippy happy after new format! format

Took 19 minutes
This commit is contained in:
Diana Carvalho
2025-04-24 13:34:08 +01:00
parent fa872f5f0e
commit 7bf0b48ea6
10 changed files with 776 additions and 540 deletions

View File

@@ -69,7 +69,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut buffer = String::new();
io::stdin()
.read_to_string(&mut buffer)
.map_err(|e| format!("Failed to read from stdin: {}", e))?;
.map_err(|e| format!("Failed to read from stdin: {e}"))?;
if buffer.trim().is_empty() {
return Err("No input provided. Expected JSON input on stdin.".into());
@@ -108,8 +108,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Output the encoded result as JSON to stdout
println!(
"{}",
serde_json::to_string(&encoded)
.map_err(|e| format!("Failed to serialize output: {}", e))?
serde_json::to_string(&encoded).map_err(|e| format!("Failed to serialize output: {e}"))?
);
Ok(())