(
rdr: &mut R,
bag: &Bag,
)
| 314 | } |
| 315 | |
| 316 | fn read_marshal_name_tuple<R: Read, Bag: ConstantBag>( |
| 317 | rdr: &mut R, |
| 318 | bag: &Bag, |
| 319 | ) -> Result<Box<[<Bag::Constant as Constant>::Name]>> { |
| 320 | let type_byte = rdr.read_u8()? & !FLAG_REF; |
| 321 | let n = match type_byte { |
| 322 | b'(' => rdr.read_u32()? as usize, |
| 323 | b')' => rdr.read_u8()? as usize, |
| 324 | _ => return Err(MarshalError::BadType), |
| 325 | }; |
| 326 | (0..n) |
| 327 | .map(|_| Ok(bag.make_name(&read_marshal_str(rdr)?))) |
| 328 | .collect::<Result<Vec<_>>>() |
| 329 | .map(Vec::into_boxed_slice) |
| 330 | } |
| 331 | |
| 332 | /// Read a marshal tuple of constants. |
| 333 | fn read_marshal_const_tuple<R: Read, Bag: ConstantBag>( |
no test coverage detected