From 82828ede539ba7e4240eafd251cc785303b4f01e Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 24 Jul 2019 20:54:03 -0400 Subject: .truncate(0) => .clear() --- src/paint.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/paint.rs') 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(()) } -- cgit v1.2.3