aboutsummaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-04 09:08:38 +0000
committerJesse Luehrs <doy@tozt.net>2019-11-04 09:08:38 +0000
commitd52d752af9a4bde993af7b0cb871e60b41eca2e0 (patch)
tree015d6392684beb19a53083cc3015bd13055e76bf /src/row.rs
parent3447af1b2197235ff68d3b228f9fd0b2a1a133c3 (diff)
downloadvt100-rust-d52d752af9a4bde993af7b0cb871e60b41eca2e0.tar.gz
vt100-rust-d52d752af9a4bde993af7b0cb871e60b41eca2e0.zip
stop reallocating vecs so much
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/row.rs b/src/row.rs
index 8fc0531..38b8eb3 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -15,7 +15,10 @@ impl Row {
}
pub fn clear(&mut self) {
- *self = Self::new(self.cells.len().try_into().unwrap());
+ for cell in &mut self.cells {
+ cell.clear();
+ }
+ self.wrapped = false;
}
pub fn cells_mut(