idiomatique change

This commit is contained in:
2026-02-12 12:20:12 +01:00
parent 92d847ba69
commit d478be5f77

View File

@ -11,14 +11,15 @@ impl TannerGraph {
let mut check = vec![vec![]; matrix.rows]; let mut check = vec![vec![]; matrix.rows];
let mut bits = vec![vec![]; matrix.cols]; let mut bits = vec![vec![]; matrix.cols];
for i in 0..matrix.rows { for (i, row_check) in check.iter_mut().enumerate() {
for j in 0..matrix.cols { for (j, col_bits) in bits.iter_mut().enumerate() {
if matrix.get(i, j) == 0 { if matrix.get(i, j) == 0 {
check[i].push(j); row_check.push(j);
bits[j].push(i); col_bits.push(i);
} }
} }
} }
Self { check, bits } Self { check, bits }
} }
} }