diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-09-22 17:53:58 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2022-09-22 17:53:58 +0200 |
commit | 6f2630992fe340ad1a122ec10c649f756e478185 (patch) | |
tree | c8c95d46546cd71e2cd5e15faef02ca9acd2b70b /nihav-flash | |
parent | f44bddc9b5520507c7571b89763de668238d790a (diff) | |
download | nihav-6f2630992fe340ad1a122ec10c649f756e478185.tar.gz |
fix some clippy warnings
Diffstat (limited to 'nihav-flash')
-rw-r--r-- | nihav-flash/src/codecs/adpcmenc.rs | 6 | ||||
-rw-r--r-- | nihav-flash/src/codecs/asao.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nihav-flash/src/codecs/adpcmenc.rs b/nihav-flash/src/codecs/adpcmenc.rs index 92a292b..9cd04f7 100644 --- a/nihav-flash/src/codecs/adpcmenc.rs +++ b/nihav-flash/src/codecs/adpcmenc.rs @@ -63,9 +63,9 @@ impl NAEncoder for ADPCMEncoder { fn negotiate_format(&self, encinfo: &EncodeParameters) -> EncoderResult<EncodeParameters> { match encinfo.format { NACodecTypeInfo::None => { - let mut ofmt = EncodeParameters::default(); - ofmt.format = NACodecTypeInfo::Audio(NAAudioInfo::new(0, 1, SND_S16_FORMAT, BLOCK_LEN)); - Ok(ofmt) + Ok(EncodeParameters { + format: NACodecTypeInfo::Audio(NAAudioInfo::new(0, 1, SND_S16_FORMAT, BLOCK_LEN)), + ..Default::default() }) }, NACodecTypeInfo::Video(_) => Err(EncoderError::FormatError), NACodecTypeInfo::Audio(ainfo) => { diff --git a/nihav-flash/src/codecs/asao.rs b/nihav-flash/src/codecs/asao.rs index 5fe8b40..ca71792 100644 --- a/nihav-flash/src/codecs/asao.rs +++ b/nihav-flash/src/codecs/asao.rs @@ -269,7 +269,7 @@ impl NADecoder for ASAODecoder { let dst = adata.get_data_mut().unwrap(); for (src, dst) in src.chunks_exact(PACKED_BLK_LEN).zip(dst.chunks_mut(BLOCK_LEN)) { - let mut br = BitReader::new(&src, BitReaderMode::LE); + let mut br = BitReader::new(src, BitReaderMode::LE); self.decode_block(&mut br, dst)?; } |