From 57f0a8c889953d0b75bc497536a4ebd0294b9ec2 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 27 Jun 2023 21:49:30 +0100 Subject: [PATCH] Remove is_done check in for loop --- agb/src/sound/mixer/sw_mixer.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/agb/src/sound/mixer/sw_mixer.rs b/agb/src/sound/mixer/sw_mixer.rs index ffa637f3..a147fd21 100644 --- a/agb/src/sound/mixer/sw_mixer.rs +++ b/agb/src/sound/mixer/sw_mixer.rs @@ -422,11 +422,7 @@ impl MixerBuffer { ) { working_buffer.fill(0.into()); - for channel in channels { - if channel.is_done { - continue; - } - + for channel in channels.filter(|channel| !channel.is_done) { let playback_speed = if channel.is_stereo { 2.into() } else {