From 29282b403c1f5c9e74e84b469fd7f866c164b462 Mon Sep 17 00:00:00 2001 From: Benjamin Nguyen Date: Tue, 4 Jul 2023 14:45:56 +0700 Subject: [PATCH] writeln macro --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6d7ab04f..fb203a7d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,13 +118,13 @@ fn run() -> Result<(), Box> { #[cfg(debug_assertions)] { if std::env::var_os("ERDTREE_DEBUG").is_none() { - let _ = stdout().write(output.as_bytes()); + let _ = writeln!(stdout(), "{output}"); } } #[cfg(not(debug_assertions))] { - let _ = stdout().write(output.as_bytes()); + let _ = writeln!(stdout(), "{output}"); } Ok(())