diff --git a/src/coverage.rs b/src/coverage.rs index 5fe7594..614603f 100644 --- a/src/coverage.rs +++ b/src/coverage.rs @@ -8,7 +8,9 @@ pub struct Coverage { } impl Coverage { - pub fn n(&self) -> usize { self.n } + pub fn n(&self) -> usize { + self.n + } pub fn new(n: usize) -> Coverage { Coverage { @@ -21,7 +23,8 @@ impl Coverage { #[inline] /// find a single uncovered (row, col) pair. Iterates in col, row order. pub fn find_uncovered_col_row(&self, mut f: F) -> Option<(usize, usize)> - where F: FnMut((usize, usize)) -> bool { + where F: FnMut((usize, usize)) -> bool + { let n = self.n(); @@ -47,7 +50,8 @@ impl Coverage { #[inline] /// iterates over all uncovered (row, col) pairs in row, col order pub fn iter_uncovered_row_col(&self, mut f: F) - where F: FnMut((usize, usize)) { + where F: FnMut((usize, usize)) + { let n = self.n(); for row in 0..n { @@ -68,7 +72,8 @@ impl Coverage { #[inline] /// iterates over all uncovered (row, col) pairs in row, col order, and set covered if f returns true. pub fn iter_uncovered_row_col_and_cover(&mut self, mut f: F) - where F: FnMut((usize, usize)) -> bool { + where F: FnMut((usize, usize)) -> bool + { let n = self.n(); for row in 0..n { diff --git a/src/weight_matrix.rs b/src/weight_matrix.rs index b95ff37..a4c3186 100644 --- a/src/weight_matrix.rs +++ b/src/weight_matrix.rs @@ -30,7 +30,8 @@ impl WeightMatrix { self.c[pos].partial_cmp(&T::zero()) == Some(Ordering::Equal) } - // for each row, subtracts the minimum of that row from each other value in the row. + // for each row, subtracts the minimum of that row from each other value in the + // row. pub fn sub_min_of_each_row(&mut self) { for row in 0..self.n() { let min = self.min_of_row(row);