From 5d428fe662db6f48c9462db3ec0fb9dce68303fa Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Sat, 18 Jul 2026 11:04:08 -0400 Subject: [PATCH] fix(consensus): collapse codec masking if into a let-chain The Rust 1.93 toolchain adopted in #575 makes clippy's collapsible_if fire on the nested `if outer_bases_length > 0 { if let Some(outer_qual) = outer_bases_qual }` in mask_consensus_quals_query_based, failing the lint job on main (and every PR rebased onto it). Collapse it into a let-chain, the idiom the newer toolchain unlocks, per the project's policy of adopting new idioms rather than suppressing the lint. --- crates/fgumi-consensus/src/codec_caller.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/fgumi-consensus/src/codec_caller.rs b/crates/fgumi-consensus/src/codec_caller.rs index 8e50d80ca..b599d7e2e 100644 --- a/crates/fgumi-consensus/src/codec_caller.rs +++ b/crates/fgumi-consensus/src/codec_caller.rs @@ -1312,13 +1312,13 @@ impl CodecConsensusCaller { let len = consensus.quals.len(); // 1. Outer bases: assign the outer quality to the first/last `outer_bases_length` bases. - if self.options.outer_bases_length > 0 { - if let Some(outer_qual) = self.options.outer_bases_qual { - let last_idx = len.saturating_sub(1); - for i in 0..min(self.options.outer_bases_length, len) { - consensus.quals[i] = outer_qual; - consensus.quals[last_idx - i] = outer_qual; - } + if self.options.outer_bases_length > 0 + && let Some(outer_qual) = self.options.outer_bases_qual + { + let last_idx = len.saturating_sub(1); + for i in 0..min(self.options.outer_bases_length, len) { + consensus.quals[i] = outer_qual; + consensus.quals[last_idx - i] = outer_qual; } }