replace vec.truncate(0) with vec.clear()
[nihav.git] / nihav-ms / src / codecs / msadpcm.rs
index 5010c03dc330457ef6e8de7a5b8d56af9be5c1bc..a63f4e5a4b9d5661885564d25e5d9ba3199e6f8c 100644 (file)
@@ -68,7 +68,7 @@ impl NADecoder for MSADPCMDecoder {
             self.block_samps = (self.block_len / channels - 7) * 2 + 2;
             self.ainfo = NAAudioInfo::new(ainfo.get_sample_rate(), channels as u8, SND_S16P_FORMAT, self.block_samps);
             self.chmap = NAChannelMap::from_str(if channels == 1 { "C" } else { "L,R" }).unwrap();
-            self.adapt_coeffs.truncate(0);
+            self.adapt_coeffs.clear();
             if let Some(ref buf) = info.get_extradata() {
                 validate!(buf.len() >= 6);
                 validate!((buf.len() & 3) == 0);
@@ -464,7 +464,7 @@ mod test {
                 tb_den:  0,
                 flags:   0,
             };
-        test_encoding_md5(&dec_config, &enc_config, enc_params,
-                          &[0xe1591a1e, 0x816d0239, 0x4cc42291, 0x4e6b69cb]);
+        test_encoding_md5(&dec_config, &enc_config, enc_params, &[],
+                          &[0x82259f45, 0xba7b984a, 0xc03c94e5, 0x00b4312b]);
     }
 }