Skip to content

Commit cd507e9

Browse files
committed
fix ICE in iter
1 parent 04d3dc8 commit cd507e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_data_structures/bitvec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
358358
/// Iterates through all the columns set to true in a given row of
359359
/// the matrix.
360360
pub fn iter<'a>(&'a self, row: R) -> impl Iterator<Item = C> + 'a {
361-
self.vector[row].iter()
361+
self.vector.get(row).into_iter().flat_map(|r| r.iter())
362362
}
363363

364364
/// Iterates through each row and the accompanying bit set.

0 commit comments

Comments
 (0)