refactor: Clean up group formatting

This commit is contained in:
Ed Page 2024-09-04 14:03:33 -05:00
parent 8bd63d2721
commit 220597eb97

View file

@ -4561,6 +4561,8 @@ impl Command {
}
pub(crate) fn format_group(&self, g: &Id) -> StyledStr {
use std::fmt::Write as _;
let g_string = self
.unroll_args_in_group(g)
.iter()
@ -4577,9 +4579,7 @@ impl Command {
.collect::<Vec<_>>()
.join("|");
let mut styled = StyledStr::new();
styled.push_str("<");
styled.push_string(g_string);
styled.push_str(">");
write!(&mut styled, "<{g_string}>").unwrap();
styled
}
}