MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / pop

Method pop

code/chapter03/lvec.rs:99–101  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

97 }
98
99 fn pop(&mut self) -> Option<T> {
100 self.remove(self.size - 1)
101 }
102
103 fn remove(&mut self, index: usize) -> Option<T> {
104 if index >= self.size { return None; }

Callers 1

mainFunction · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected