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

Method pop_back

crates/vm/src/dict_inner.rs:786–801  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

784 }
785
786 pub fn pop_back(&self) -> Option<(PyObjectRef, T)> {
787 let inner = &mut *self.write();
788 let entry = loop {
789 let entry = inner.entries.pop()?;
790 if let Some(entry) = entry {
791 break entry;
792 }
793 };
794 inner.used -= 1;
795 *unsafe {
796 // entry.index always refers valid index
797 inner.indices.get_unchecked_mut(entry.index)
798 } = IndexEntry::DUMMY;
799 self.bump_version();
800 Some((entry.key, entry.value))
801 }
802
803 pub fn sizeof(&self) -> usize {
804 let inner = self.read();

Callers 4

appendleftMethod · 0.80
popMethod · 0.80
popitemMethod · 0.80
popMethod · 0.80

Calls 4

bump_versionMethod · 0.80
SomeClass · 0.50
writeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected