We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59ebfdd + 7943c9c commit 6eb0a5fCopy full SHA for 6eb0a5f
compiler/rustc_index/src/bit_set.rs
@@ -841,7 +841,7 @@ impl<T: Idx> GrowableBitSet<T> {
841
#[inline]
842
pub fn contains(&self, elem: T) -> bool {
843
let (word_index, mask) = word_index_and_mask(elem);
844
- if let Some(word) = self.bit_set.words.get(word_index) { (word & mask) != 0 } else { false }
+ self.bit_set.words.get(word_index).map_or(false, |word| (word & mask) != 0)
845
}
846
847
0 commit comments