From 8c2fe97a81a42e654258fd82d95e0650647208fb Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Sat, 2 Mar 2024 20:49:34 -0700 Subject: Clear the buffer for STDIN after incant_write/incant_addendum Clear the 'out' buffer after we have written STDOUT to the files specified after the Meter::Write or Meter::Addendum verse. --- src/recite.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/recite.rs') diff --git a/src/recite.rs b/src/recite.rs index 1beee96..12c98ae 100644 --- a/src/recite.rs +++ b/src/recite.rs @@ -221,6 +221,9 @@ impl Meter { file.write(out.as_bytes())?; } + // Clear out + out.clear(); + // Return the exit status Ok(status) } @@ -246,6 +249,9 @@ impl Meter { file.write(out.as_bytes())?; } + // Clear out + out.clear(); + // Return the exit status Ok(status) } -- cgit v1.2.3