Chore: Fix new(er) Clippy lints

This commit is contained in:
Kyle Simpson
2022-11-20 17:59:28 +00:00
parent 646190eaf8
commit 662debd414
7 changed files with 13 additions and 14 deletions

View File

@@ -24,7 +24,7 @@ impl DisposalThread {
}
pub(super) fn dispose(&self, message: DisposalMessage) {
drop(self.0.send(message))
drop(self.0.send(message));
}
}

View File

@@ -307,7 +307,7 @@ where
if source_mono {
// mix this signal into *all* output channels at req'd volume.
let source_plane = source_raw_planes[0];
for d_plane in (&mut *target.planes_mut().planes()).iter_mut() {
for d_plane in (*target.planes_mut().planes()).iter_mut() {
for (d, s) in d_plane[dest_pos..dest_pos + mix_ct]
.iter_mut()
.zip(source_plane[source_pos..source_pos + mix_ct].iter())
@@ -331,7 +331,7 @@ where
}
} else {
// stereo -> stereo: don't change volume, map input -> output channels w/ no duplication
for (d_plane, s_plane) in (&mut *target.planes_mut().planes())
for (d_plane, s_plane) in (*target.planes_mut().planes())
.iter_mut()
.zip(source_raw_planes[..].iter())
{
@@ -364,7 +364,7 @@ fn mix_resampled(
// see `mix_symph_buffer` for explanations of stereo<->mono logic.
if source_mono {
let source_plane = &source[0];
for d_plane in (&mut *target.planes_mut().planes()).iter_mut() {
for d_plane in (*target.planes_mut().planes()).iter_mut() {
for (d, s) in d_plane[dest_pos..dest_pos + mix_ct]
.iter_mut()
.zip(source_plane)
@@ -382,7 +382,7 @@ fn mix_resampled(
}
}
} else {
for (d_plane, s_plane) in (&mut *target.planes_mut().planes())
for (d_plane, s_plane) in (*target.planes_mut().planes())
.iter_mut()
.zip(source[..].iter())
{
@@ -428,7 +428,7 @@ fn copy_symph_buffer<S>(
where
S: Sample + IntoSample<f32>,
{
for (d_plane, s_plane) in (&mut *target.planes_mut().planes())
for (d_plane, s_plane) in (*target.planes_mut().planes())
.iter_mut()
.zip(source.planes().planes()[..].iter())
{

View File

@@ -635,8 +635,7 @@ impl Mixer {
let payload = rtp.payload_mut();
(&mut payload[TAG_SIZE..TAG_SIZE + SILENT_FRAME.len()])
.copy_from_slice(&SILENT_FRAME[..]);
payload[TAG_SIZE..TAG_SIZE + SILENT_FRAME.len()].copy_from_slice(&SILENT_FRAME[..]);
mix_len = MixType::Passthrough(SILENT_FRAME.len());
} else {
@@ -680,7 +679,7 @@ impl Mixer {
// for handing out audio data to the outside world.
let samples_to_copy = self.config.mix_mode.channels() * n;
(&mut softclip_buffer[..samples_to_copy])
softclip_buffer[..samples_to_copy]
.copy_from_slice(&self.sample_buffer.samples()[..samples_to_copy]);
}