@@ -237,11 +237,6 @@ impl<T: Idx> BitSet<T> {
237
237
new_word != word
238
238
}
239
239
240
- /// Gets a slice of the underlying words.
241
- pub fn words ( & self ) -> & [ Word ] {
242
- & self . words
243
- }
244
-
245
240
/// Iterates over the indices of set bits in a sorted order.
246
241
#[ inline]
247
242
pub fn iter ( & self ) -> BitIter < ' _ , T > {
@@ -1601,11 +1596,11 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
1601
1596
pub fn from_row_n ( row : & BitSet < C > , num_rows : usize ) -> BitMatrix < R , C > {
1602
1597
let num_columns = row. domain_size ( ) ;
1603
1598
let words_per_row = num_words ( num_columns) ;
1604
- assert_eq ! ( words_per_row, row. words( ) . len( ) ) ;
1599
+ assert_eq ! ( words_per_row, row. words. len( ) ) ;
1605
1600
BitMatrix {
1606
1601
num_rows,
1607
1602
num_columns,
1608
- words : iter:: repeat ( row. words ( ) ) . take ( num_rows) . flatten ( ) . cloned ( ) . collect ( ) ,
1603
+ words : iter:: repeat ( & row. words ) . take ( num_rows) . flatten ( ) . cloned ( ) . collect ( ) ,
1609
1604
marker : PhantomData ,
1610
1605
}
1611
1606
}
@@ -1700,9 +1695,9 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
1700
1695
assert_eq ! ( with. domain_size( ) , self . num_columns) ;
1701
1696
let ( write_start, write_end) = self . range ( write) ;
1702
1697
let mut changed = false ;
1703
- for ( read_index, write_index) in iter:: zip ( 0 ..with. words ( ) . len ( ) , write_start..write_end) {
1698
+ for ( read_index, write_index) in iter:: zip ( 0 ..with. words . len ( ) , write_start..write_end) {
1704
1699
let word = self . words [ write_index] ;
1705
- let new_word = word | with. words ( ) [ read_index] ;
1700
+ let new_word = word | with. words [ read_index] ;
1706
1701
self . words [ write_index] = new_word;
1707
1702
changed |= word != new_word;
1708
1703
}
0 commit comments