summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Nguyen <benjamin.van.nguyen@gmail.com>2023-07-04 14:45:56 +0700
committerBenjamin Nguyen <benjamin.van.nguyen@gmail.com>2023-07-04 14:45:56 +0700
commit29282b403c1f5c9e74e84b469fd7f866c164b462 (patch)
tree17e5ba318b443277faa1b6938f7bb375491b559c
parent36cb7e075dd87f85b62122cfd31057e01af675fb (diff)
writeln macrobroken-pipe
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 6d7ab04..fb203a7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -118,13 +118,13 @@ fn run() -> Result<(), Box<dyn Error>> {
#[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(())