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

Function write_len

crates/compiler-core/src/marshal.rs:765–770  ·  view source on GitHub ↗
(buf: &mut W, len: usize)

Source from the content-addressed store, hash-verified

763}
764
765pub(crate) fn write_len<W: Write>(buf: &mut W, len: usize) {
766 let Ok(len) = len.try_into() else {
767 panic!("too long to serialize")
768 };
769 buf.write_u32(len);
770}
771
772pub(crate) fn write_vec<W: Write>(buf: &mut W, slice: &[u8]) {
773 write_len(buf, slice.len());

Callers 6

write_vecFunction · 0.85
serialize_valueFunction · 0.85
serialize_codeFunction · 0.85
write_marshal_strFunction · 0.85
write_marshal_name_tupleFunction · 0.85
write_libFunction · 0.85

Calls 1

write_u32Method · 0.80

Tested by

no test coverage detected