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

Method pop

publication/code/chapter04/lvec.rs:100–106  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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

Callers 15

nextMethod · 0.45
nextMethod · 0.45
dequeueMethod · 0.45
dequeueMethod · 0.45
remove_frontMethod · 0.45
remove_frontMethod · 0.45
edit_distance2Function · 0.45
merkle_hash_strMethod · 0.45
merkle_hash_strMethod · 0.45
merkle_hash_strMethod · 0.45
dequeueMethod · 0.45
dequeueMethod · 0.45

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected