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

Method adjust_position

crates/vm/src/stdlib/_io.rs:1446–1451  ·  view source on GitHub ↗
(&mut self, new_pos: Offset)

Source from the content-addressed store, hash-verified

1444 }
1445
1446 const fn adjust_position(&mut self, new_pos: Offset) {
1447 self.pos = new_pos;
1448 if self.valid_read() && self.read_end < self.pos {
1449 self.read_end = self.pos
1450 }
1451 }
1452
1453 fn peek(&mut self, vm: &VirtualMachine) -> PyResult<Vec<u8>> {
1454 let have = self.readahead();

Callers 1

writeMethod · 0.80

Calls 1

valid_readMethod · 0.80

Tested by

no test coverage detected