| 259 | /// constants that are standalone or projections, this is the only |
| 260 | /// byte we ever read at enumeration time. |
| 261 | pub fn peek_variant(&self) -> Result<ConstVariantTag, String> { |
| 262 | let bytes = self.bytes.as_slice(); |
| 263 | let head = *bytes |
| 264 | .first() |
| 265 | .ok_or_else(|| "LazyConstant::peek_variant: empty bytes".to_string())?; |
| 266 | let flag = head >> 4; |
| 267 | let large = head & 0b1000 != 0; |
| 268 | let small = head & 0b0111; |
| 269 | match flag { |
| 270 | Constant::FLAG_MUTS => Ok(ConstVariantTag::Muts), |
| 271 | Constant::FLAG => { |
| 272 | if large { |