Returns whether `idx` is set or not.
(&self, idx: usize)
| 193 | |
| 194 | /// Returns whether `idx` is set or not. |
| 195 | pub fn get(&self, idx: usize) -> bool { |
| 196 | let (block_idx, pos_in_block) = Self::idx_to_pos(idx); |
| 197 | let block = self.storage()[block_idx]; |
| 198 | (block & (B::ONE << pos_in_block)) != B::ZERO |
| 199 | } |
| 200 | |
| 201 | /// Sets bit at position `idx` to `val`. |
| 202 | pub fn set(&mut self, idx: usize, val: bool) { |
no test coverage detected