diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index 2982c184..4d00f954 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -139,7 +139,7 @@ impl DMat { DMat { nrows: nrows, ncols: ncols, - mij: Vec::from_fn(nrows * ncols, |i| f(i % nrows, i / nrows)) + mij: Vec::from_fn(nrows * ncols, |i| { let m = i / nrows; f(i - m * nrows, m) }) } }