mirror of
https://github.com/sharkdp/bat
synced 2026-07-30 18:11:44 +00:00
Remove unnecessary heap allocations in PrettyPrinter::print for style components
This commit is contained in:
@@ -129,4 +129,12 @@ impl StyleComponents {
|
||||
pub fn plain(&self) -> bool {
|
||||
self.0.iter().all(|c| c == &StyleComponent::Plain)
|
||||
}
|
||||
|
||||
pub fn insert(&mut self, component: StyleComponent) {
|
||||
self.0.insert(component);
|
||||
}
|
||||
|
||||
pub fn clear(&mut self) {
|
||||
self.0.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user