Skip to content

Commit 7090b7e

Browse files
committed
inline some stuff
1 parent 9260f4f commit 7090b7e

File tree

1 file changed

+2
-0
lines changed
  • crates/ty_python_semantic/src

1 file changed

+2
-0
lines changed

crates/ty_python_semantic/src/rank.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ impl RankBitBox {
5757
Self { bits, chunk_ranks }
5858
}
5959

60+
#[inline]
6061
pub(crate) fn get_bit(&self, index: usize) -> Option<bool> {
6162
self.bits.get(index).map(|bit| *bit)
6263
}
6364

6465
/// Returns the number of bits _before_ (and not including) the given index that are set.
66+
#[inline]
6567
pub(crate) fn rank(&self, index: usize) -> u32 {
6668
let chunk_index = index / CHUNK_SIZE;
6769
let index_within_chunk = index % CHUNK_SIZE;

0 commit comments

Comments
 (0)