From b774eeb142980b7c078d342d64617c4876864b2d Mon Sep 17 00:00:00 2001 From: amy Date: Sun, 23 Jan 2022 16:11:04 +0100 Subject: [PATCH] make append_file strip newlines --- src/internal/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/files.rs b/src/internal/files.rs index 585e3ad..26baf0b 100755 --- a/src/internal/files.rs +++ b/src/internal/files.rs @@ -15,7 +15,7 @@ pub fn create_file(path: &str) { } pub fn append_file(path: &str, content: &str) -> std::io::Result<()> { - log(format!("Appending {} to file {}", content, path)); + log(format!("Appending {} to file {}", content.replace("\n", ""), path)); let mut file = OpenOptions::new().append(true).open(path)?; file.write_all(content.as_bytes())?; Ok(())