INNER CODE UNIT · Rust
feature_size
David-OConnor/plascad · src/gui/mod.rs:166
let feature_size = feature.range.end - feature.range.start - 1;
if feature_size < smallest_feature_size {
smallest_feature = i;
smallest_feature_size = feature_size;
}
}
}
if matched {
return Some(smallest_feature);
}
}
None
}
/// todo: DRY with `feature_from_index`. Combine.
fn primer_from_index(index: &Option<usize>, primers: &[Primer]) -> Option<usize> {
if let Some(seq_i) = index {
// If multiple features are in the cursor's region, choose the smallest.