1
0
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:
rhysd
2023-01-15 19:04:16 +09:00
parent 5e3abcad07
commit 4cc2a489d0
2 changed files with 21 additions and 12 deletions
+8
View File
@@ -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();
}
}