diff options
| author | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-09 20:44:22 +0200 |
|---|---|---|
| committer | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-10 15:38:19 +0200 |
| commit | 71dd0b928b8b175b69e56fc58e5878b73f090718 (patch) | |
| tree | aeffddc5806cdc0d8b3d866d13c6235385b876a5 /compiler/rustc_index/src/bit_set.rs | |
| parent | 15491d7b6be1065217e09bd735e4ecffbe9838ba (diff) | |
| download | rust-71dd0b928b8b175b69e56fc58e5878b73f090718.tar.gz rust-71dd0b928b8b175b69e56fc58e5878b73f090718.zip | |
Apply clippy suggestions
Diffstat (limited to 'compiler/rustc_index/src/bit_set.rs')
| -rw-r--r-- | compiler/rustc_index/src/bit_set.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs index 5b1add4cfc6..d3c7a390cd5 100644 --- a/compiler/rustc_index/src/bit_set.rs +++ b/compiler/rustc_index/src/bit_set.rs @@ -991,8 +991,8 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> { assert!(row.index() < self.num_rows); let (start, end) = self.range(row); let words = &mut self.words[..]; - for index in start..end { - words[index] = !0; + for word in words[start..end].iter_mut() { + *word = !0; } self.clear_excess_bits(row); } @@ -1144,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<'a>(&'a self, row: R) -> impl Iterator<Item = C> + 'a { + pub fn iter(&self, row: R) -> impl Iterator<Item = C> + '_ { self.row(row).into_iter().flat_map(|r| r.iter()) } |
