This commit is contained in:
alexpasmantier 2024-07-22 21:48:58 +02:00
parent e4d3e7a86b
commit 4fbc2e47bc
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@ -297,7 +297,7 @@ dependencies = [
[[package]] [[package]]
name = "grip-grab" name = "grip-grab"
version = "0.2.8" version = "0.2.9"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "grip-grab" name = "grip-grab"
version = "0.2.8" version = "0.2.9"
edition = "2021" edition = "2021"
authors = ["Alexandre Pasmantier <alex.pasmant@gmail.com>"] authors = ["Alexandre Pasmantier <alex.pasmant@gmail.com>"]
license = "Apache-2.0" license = "Apache-2.0"

View File

@ -131,12 +131,12 @@ impl Printer {
} }
pub fn print(&mut self) -> Result<()> { pub fn print(&mut self) -> Result<()> {
self.writer.print(&self.buffer); self.writer.print(&self.buffer)?;
self.reset_ansi_formatting() self.reset_ansi_formatting()
} }
fn reset_ansi_formatting(&mut self) -> Result<()> { fn reset_ansi_formatting(&mut self) -> Result<()> {
self.buffer.reset(); self.buffer.reset()?;
self.write_newline_to_buffer() self.write_newline_to_buffer()
} }
} }