diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-04 09:08:38 +0000 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-04 09:08:38 +0000 |
commit | d52d752af9a4bde993af7b0cb871e60b41eca2e0 (patch) | |
tree | 015d6392684beb19a53083cc3015bd13055e76bf /src/row.rs | |
parent | 3447af1b2197235ff68d3b228f9fd0b2a1a133c3 (diff) | |
download | vt100-rust-d52d752af9a4bde993af7b0cb871e60b41eca2e0.tar.gz vt100-rust-d52d752af9a4bde993af7b0cb871e60b41eca2e0.zip |
stop reallocating vecs so much
Diffstat (limited to 'src/row.rs')
-rw-r--r-- | src/row.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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( |