Make IndexVec::ensure_contains_elem return a reference to the element
This commit is contained in:
@@ -261,8 +261,7 @@ impl<R: Idx, C: Step + Idx> SparseIntervalMatrix<R, C> {
|
||||
}
|
||||
|
||||
fn ensure_row(&mut self, row: R) -> &mut IntervalSet<C> {
|
||||
self.rows.ensure_contains_elem(row, || IntervalSet::new(self.column_size));
|
||||
&mut self.rows[row]
|
||||
self.rows.ensure_contains_elem(row, || IntervalSet::new(self.column_size))
|
||||
}
|
||||
|
||||
pub fn union_row(&mut self, row: R, from: &IntervalSet<C>) -> bool
|
||||
|
||||
Reference in New Issue
Block a user