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

Method next

crates/common/src/boxvec.rs:395–405  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

393 type Item = T;
394
395 fn next(&mut self) -> Option<T> {
396 if self.index == self.v.len {
397 None
398 } else {
399 unsafe {
400 let index = self.index;
401 self.index += 1;
402 Some(ptr::read(self.v.get_unchecked_ptr(index)))
403 }
404 }
405 }
406
407 fn size_hint(&self) -> (usize, Option<usize>) {
408 let len = self.v.len() - self.index;

Callers 15

pop_atMethod · 0.45
extendMethod · 0.45
try_get_charsFunction · 0.45
try_get_codepointsFunction · 0.45
parseMethod · 0.45
from_stringMethod · 0.45
parse_alternate_formFunction · 0.45
parse_zeroFunction · 0.45
parse_precisionFunction · 0.45
parse_partMethod · 0.45

Calls 4

get_unchecked_ptrMethod · 0.80
readFunction · 0.70
SomeClass · 0.50
mapMethod · 0.45

Tested by

no test coverage detected