replace vec.truncate(0) with vec.clear()
[nihav.git] / nihav-itu / src / codecs / h264 / mod.rs
index 976b8b575a47178af71eb5095132ef5fff33fa3c..e23d909930bcc4704168027ca8c5d23c1b077268 100644 (file)
@@ -194,7 +194,7 @@ struct H264Decoder {
 fn unescape_nal(src: &[u8], dst: &mut Vec<u8>) -> usize {
     let mut off = 0;
     let mut zrun = 0;
-    dst.truncate(0);
+    dst.clear();
     dst.reserve(src.len());
     while off < src.len() {
         dst.push(src[off]);
@@ -657,7 +657,7 @@ println!("PAFF?");
             }
         }
     }
-    #[allow(clippy::cyclomatic_complexity)]
+    #[allow(clippy::cognitive_complexity)]
     fn handle_macroblock(&mut self, mb_info: &mut CurrentMBInfo) {
         let pps = &self.pps[self.cur_pps];