minor code cleanups

This commit is contained in:
Matthias Krüger 2022-12-12 19:49:53 +01:00
parent 37d7de3379
commit 2ea368e53c
8 changed files with 11 additions and 20 deletions

View file

@ -209,7 +209,7 @@ impl<T: Idx> BitSet<T> {
self.words[start_word_index] |= !(start_mask - 1);
// And all trailing bits (i.e. from 0..=end) in the end word,
// including the end.
self.words[end_word_index] |= end_mask | end_mask - 1;
self.words[end_word_index] |= end_mask | (end_mask - 1);
} else {
self.words[start_word_index] |= end_mask | (end_mask - start_mask);
}