From 17734cdcbf8ea30ded09a0b14372d92c11d1cc8c Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 4 Oct 2023 20:24:49 -0500 Subject: add safety comments and simplify some code --- azalea-core/src/bitset.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'azalea-core/src/bitset.rs') diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index b7a426c9..912216a8 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -143,10 +143,12 @@ where } } + #[inline] pub fn index(&self, index: usize) -> bool { (self.data[index / 8] & (1u8 << (index % 8))) != 0 } + #[inline] pub fn set(&mut self, bit_index: usize) { self.data[bit_index / 8] |= 1u8 << (bit_index % 8); } -- cgit v1.2.3