MCPcopy Index your code
hub / github.com/RustPython/RustPython / read_marshal_str_vec

Function read_marshal_str_vec

crates/compiler-core/src/marshal.rs:306–314  ·  view source on GitHub ↗

Read a marshal tuple of strings, returning owned Strings.

(rdr: &mut R)

Source from the content-addressed store, hash-verified

304
305/// Read a marshal tuple of strings, returning owned Strings.
306fn read_marshal_str_vec<R: Read>(rdr: &mut R) -> Result<Vec<alloc::string::String>> {
307 let type_byte = rdr.read_u8()? & !FLAG_REF;
308 let n = match type_byte {
309 b'(' => rdr.read_u32()? as usize,
310 b')' => rdr.read_u8()? as usize,
311 _ => return Err(MarshalError::BadType),
312 };
313 (0..n).map(|_| read_marshal_str(rdr)).collect()
314}
315
316fn read_marshal_name_tuple<R: Read, Bag: ConstantBag>(
317 rdr: &mut R,

Callers 1

deserialize_codeFunction · 0.85

Calls 6

read_marshal_strFunction · 0.85
read_u8Method · 0.80
read_u32Method · 0.80
collectMethod · 0.80
ErrClass · 0.50
mapMethod · 0.45

Tested by

no test coverage detected