forked from mirrors/jj
formatter: minor cleanup in --color=debug handling
This commit is contained in:
parent
5aa08042c5
commit
8ee5b783b3
1 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ impl<W: Write> ColorFormatter<W> {
|
|||
labels: vec![],
|
||||
cached_styles: HashMap::new(),
|
||||
current_style: Style::default(),
|
||||
current_debug: if debug { Some(String::new()) } else { None },
|
||||
current_debug: debug.then(String::new),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ impl<W: Write> ColorFormatter<W> {
|
|||
let new_debug = match &self.current_debug {
|
||||
Some(current) => {
|
||||
let joined = self.labels.join(" ");
|
||||
if joined.eq(current) {
|
||||
if joined == *current {
|
||||
None
|
||||
} else {
|
||||
if !current.is_empty() {
|
||||
|
|
Loading…
Reference in a new issue