From 9592bb74a72ed723433a4189b074630bf83a4ffe Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Tue, 24 Nov 2020 23:49:49 -0800 Subject: [PATCH] lockin: change zip order in decimate for clarity --- dsp/src/lockin.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dsp/src/lockin.rs b/dsp/src/lockin.rs index e185c31..7f420d2 100644 --- a/dsp/src/lockin.rs +++ b/dsp/src/lockin.rs @@ -277,9 +277,13 @@ pub fn decimate( in_phase_decimated .iter_mut() .zip(quadrature_decimated.iter_mut()) - .zip(in_phase.iter().step_by(n_k)) - .zip(quadrature.iter().step_by(n_k)) - .for_each(|(((i_decimated, q_decimated), i_original), q_original)| { + .zip( + in_phase + .iter() + .step_by(n_k) + .zip(quadrature.iter().step_by(n_k)), + ) + .for_each(|((i_decimated, q_decimated), (i_original, q_original))| { *i_decimated = *i_original; *q_decimated = *q_original; });