forked from mirrors/jj
formatter: avoid updating unchanged self.current_color
This commit is contained in:
parent
8db8da5990
commit
4b80c259cf
1 changed files with 2 additions and 2 deletions
|
@ -254,8 +254,8 @@ impl<W: Write> Formatter for ColorFormatter<W> {
|
|||
let new_color = self.current_color();
|
||||
if new_color != self.current_color {
|
||||
self.output.write_all(&new_color)?;
|
||||
self.current_color = new_color;
|
||||
}
|
||||
self.current_color = new_color;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -264,8 +264,8 @@ impl<W: Write> Formatter for ColorFormatter<W> {
|
|||
let new_color = self.current_color();
|
||||
if new_color != self.current_color {
|
||||
self.output.write_all(&new_color)?;
|
||||
self.current_color = new_color;
|
||||
}
|
||||
self.current_color = new_color;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue