From 26c312142a9447c0dfe58d13e00e2d9f2c085293 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 16 Dec 2025 10:58:09 +0100 Subject: [PATCH] feat: add a bit more error handling / showing --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 61f777a..dfcd1ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,8 +13,10 @@ fn main() -> anyhow::Result<()> { let safe_utf8_content = String::from_utf8_lossy(&output_bytes); - output.write_all(safe_utf8_content.as_bytes())?; - output.flush()?; + output + .write_all(safe_utf8_content.as_bytes()) + .context("could not write to stdout")?; + output.flush().context("could not flush")?; Ok(()) }