diff --git a/src/decoder/symphonia.rs b/src/decoder/symphonia.rs index 5787acd..0c4943b 100644 --- a/src/decoder/symphonia.rs +++ b/src/decoder/symphonia.rs @@ -112,7 +112,7 @@ impl SymphoniaDecoder { #[inline] fn get_buffer(decoded: AudioBufferRef, spec: &SignalSpec) -> SampleBuffer { let duration = units::Duration::from(decoded.capacity() as u64); - let mut buffer = SampleBuffer::::new(duration, spec.clone()); + let mut buffer = SampleBuffer::::new(duration, *spec); buffer.copy_interleaved_ref(decoded); buffer } diff --git a/src/stream.rs b/src/stream.rs index 59a4c91..e20e57c 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -349,9 +349,9 @@ fn supported_output_formats( Ok(supported.into_iter().flat_map(|sf| { let max_rate = sf.max_sample_rate(); let min_rate = sf.min_sample_rate(); - let mut formats = vec![sf.clone().with_max_sample_rate()]; + let mut formats = vec![sf.with_max_sample_rate()]; if HZ_44100 < max_rate && HZ_44100 > min_rate { - formats.push(sf.clone().with_sample_rate(HZ_44100)) + formats.push(sf.with_sample_rate(HZ_44100)) } formats.push(sf.with_sample_rate(min_rate)); formats