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

Method read_slice_borrow

crates/compiler-core/src/marshal.rs:173–175  ·  view source on GitHub ↗
(&mut self, n: u32)

Source from the content-addressed store, hash-verified

171
172impl<'a> ReadBorrowed<'a> for &'a [u8] {
173 fn read_slice_borrow(&mut self, n: u32) -> Result<&'a [u8]> {
174 self.split_off(..n as usize).ok_or(MarshalError::Eof)
175 }
176}
177
178pub struct Cursor<B> {

Callers 3

read_str_borrowMethod · 0.80
read_sliceMethod · 0.80
read_entryFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected