diff options
author | Dan Davison <dandavison7@gmail.com> | 2019-07-24 20:54:03 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2019-07-24 20:54:03 -0400 |
commit | 82828ede539ba7e4240eafd251cc785303b4f01e (patch) | |
tree | 2888375349b343fb68902817213737d255c442c5 /src/paint.rs | |
parent | c8d665462e9a4375730441f9a686f88f5da9385c (diff) |
.truncate(0) => .clear()
Diffstat (limited to 'src/paint.rs')
-rw-r--r-- | src/paint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/paint.rs b/src/paint.rs index 131ac69d..7672918b 100644 --- a/src/paint.rs +++ b/src/paint.rs @@ -87,7 +87,7 @@ impl<'a> Painter<'a> { /// Write output buffer to output stream, and clear the buffer. pub fn emit(&mut self) -> std::io::Result<()> { write!(self.writer, "{}", self.output_buffer)?; - self.output_buffer.truncate(0); + self.output_buffer.clear(); Ok(()) } |