Looks up a string by its dynamic atom bits.
(&self, bits: u32)
| 127 | |
| 128 | /// Looks up a string by its dynamic atom bits. |
| 129 | fn lookup(&self, bits: u32) -> Option<&'static str> { |
| 130 | debug_assert!(Self::is_dynamic(bits), "lookup() called on static atom bits"); |
| 131 | let index = (bits & ((1 << ATOM_DYNAMIC_BIT) - 1)) as usize; // Mask off dynamic bit to get index |
| 132 | self.bits_to_str_vec.read().unwrap().get(index).copied() |
| 133 | } |
| 134 | |
| 135 | /// Returns true if the given bits represent a dynamic atom. |
| 136 | #[inline] |
no test coverage detected