Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov"
The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit6ae8912a3e, reversing changes made to86d6d2b738.
This commit is contained in:
@@ -990,8 +990,9 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
|
||||
pub fn insert_all_into_row(&mut self, row: R) {
|
||||
assert!(row.index() < self.num_rows);
|
||||
let (start, end) = self.range(row);
|
||||
for word in self.words[start..end].iter_mut() {
|
||||
*word = !0;
|
||||
let words = &mut self.words[..];
|
||||
for index in start..end {
|
||||
words[index] = !0;
|
||||
}
|
||||
self.clear_excess_bits(row);
|
||||
}
|
||||
@@ -1143,7 +1144,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
|
||||
|
||||
/// Iterates through all the columns set to true in a given row of
|
||||
/// the matrix.
|
||||
pub fn iter(&self, row: R) -> impl Iterator<Item = C> + '_ {
|
||||
pub fn iter<'a>(&'a self, row: R) -> impl Iterator<Item = C> + 'a {
|
||||
self.row(row).into_iter().flat_map(|r| r.iter())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user