summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRory Dudley2024-03-02 20:49:34 -0700
committerRory Dudley2024-03-02 20:49:34 -0700
commit8c2fe97a81a42e654258fd82d95e0650647208fb (patch)
tree05c595caa9964f73cb660193575bb81bd623755f /src
parentd1c1d2db8d796190afe1e2f7128414cd34424080 (diff)
downloaddwarvish-8c2fe97a81a42e654258fd82d95e0650647208fb.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/recite.rs6
1 files changed, 6 insertions, 0 deletions
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)
}