aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-codec-support/src/codecs/h263/mod.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2021-10-29 14:40:07 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2021-10-29 14:40:07 +0200
commit379524159c95f1c3639976ccf35f9d47cd9732ac (patch)
treea420329fa8bbb301f2d290d4813621b1c64afd12 /nihav-codec-support/src/codecs/h263/mod.rs
parentfa49f0616b3b7f6454ea5722f8a6d1ca38908df6 (diff)
downloadnihav-379524159c95f1c3639976ccf35f9d47cd9732ac.tar.gz
replace vec.truncate(0) with vec.clear()
Diffstat (limited to 'nihav-codec-support/src/codecs/h263/mod.rs')
-rw-r--r--nihav-codec-support/src/codecs/h263/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/nihav-codec-support/src/codecs/h263/mod.rs b/nihav-codec-support/src/codecs/h263/mod.rs
index 0ddfed5..e357778 100644
--- a/nihav-codec-support/src/codecs/h263/mod.rs
+++ b/nihav-codec-support/src/codecs/h263/mod.rs
@@ -358,9 +358,9 @@ impl CBPInfo {
fn new() -> Self { CBPInfo{ cbp: Vec::new(), q: Vec::new(), mb_w: 0 } }
fn reset(&mut self, mb_w: usize) {
self.mb_w = mb_w;
- self.cbp.truncate(0);
+ self.cbp.clear();
self.cbp.resize(self.mb_w * 2, 0);
- self.q.truncate(0);
+ self.q.clear();
self.q.resize(self.mb_w * 2, 0);
}
fn update_row(&mut self) {