chore: silence clippy warnings
- pareto/crowding.rs: rewrite the inner loop to iterate per-objective
via index_axis-style indexing on `oriented` rather than naming an
unused loop variable `k`.
- operators/{binary,permutation}.rs tests: pass parents via
`std::slice::from_ref` instead of `&[parent.clone()]` to avoid the
cloned_ref_to_slice_refs lint.
Pure cleanup — no behavior change, all 83 unit tests + 2 doctests still
pass.
This commit is contained in:
@@ -33,6 +33,7 @@ pub fn crowding_distance<D>(
|
||||
.map(|&idx| objectives.as_minimization(&population[idx].evaluation.objectives))
|
||||
.collect();
|
||||
|
||||
#[allow(clippy::needless_range_loop)] // `k` indexes into nested vectors below.
|
||||
for k in 0..m {
|
||||
// Sort indices into `front` by objective k.
|
||||
let mut order: Vec<usize> = (0..n).collect();
|
||||
|
||||
Reference in New Issue
Block a user