diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:40:07 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2021-10-29 14:40:07 +0200 |
commit | 379524159c95f1c3639976ccf35f9d47cd9732ac (patch) | |
tree | a420329fa8bbb301f2d290d4813621b1c64afd12 /nihav-qt/src/codecs/svq3.rs | |
parent | fa49f0616b3b7f6454ea5722f8a6d1ca38908df6 (diff) | |
download | nihav-379524159c95f1c3639976ccf35f9d47cd9732ac.tar.gz |
replace vec.truncate(0) with vec.clear()
Diffstat (limited to 'nihav-qt/src/codecs/svq3.rs')
-rw-r--r-- | nihav-qt/src/codecs/svq3.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nihav-qt/src/codecs/svq3.rs b/nihav-qt/src/codecs/svq3.rs index 46480f5..d2cd385 100644 --- a/nihav-qt/src/codecs/svq3.rs +++ b/nihav-qt/src/codecs/svq3.rs @@ -140,13 +140,13 @@ impl MVInfo { } fn reset(&mut self) { let size = self.w * self.h; - self.mv_f.truncate(0); + self.mv_f.clear(); self.mv_f.resize(size, ZERO_MV); - self.mv_b.truncate(0); + self.mv_b.clear(); self.mv_b.resize(size, ZERO_MV); - self.has_f.truncate(0); + self.has_f.clear(); self.has_f.resize(size >> 4, false); - self.has_b.truncate(0); + self.has_b.clear(); self.has_b.resize(size >> 4, false); } fn fill(&mut self, mb_x: usize, mb_y: usize, fwd: bool, mv: MV) { @@ -518,7 +518,7 @@ unimplemented!(); }; let slice_len = length + llen + 1; validate!(src.len() >= slice_len); - self.slice_buf.truncate(0); + self.slice_buf.clear(); if llen > 1 { self.slice_buf.extend_from_slice(&src[slice_len - llen + 1..][..llen - 1]); } |