Make SparseBitMatrix::ensure_row public to enable general mutation of rows

This commit is contained in:
Will Crichton 2021-08-23 16:13:17 -07:00
parent a49e38e672
commit 0ca51b6b66

View file

@ -956,7 +956,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
Self { num_columns, rows: IndexVec::new() }
}
fn ensure_row(&mut self, row: R) -> &mut HybridBitSet<C> {
pub fn ensure_row(&mut self, row: R) -> &mut HybridBitSet<C> {
// Instantiate any missing rows up to and including row `row` with an
// empty HybridBitSet.
self.rows.ensure_contains_elem(row, || None);