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

Method next_back

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

Source from the content-addressed store, hash-verified

412
413impl<T> DoubleEndedIterator for IntoIter<T> {
414 fn next_back(&mut self) -> Option<T> {
415 if self.index == self.v.len {
416 None
417 } else {
418 unsafe {
419 let new_len = self.v.len() - 1;
420 self.v.set_len(new_len);
421 Some(ptr::read(self.v.get_unchecked_ptr(new_len)))
422 }
423 }
424 }
425}
426
427impl<T> ExactSizeIterator for IntoIter<T> {}

Callers 1

Calls 6

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

Tested by

no test coverage detected