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

Method pop

publication/code/chapter05/num2str_stk.rs:22–26  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

20 }
21
22 fn pop(&mut self) -> Option<T> {
23 if 0 == self.top { return None; }
24 self.top -= 1;
25 self.data.pop()
26 }
27
28 fn is_empty(&self) -> bool {
29 0 == self.top

Callers 1

num2str_stkFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected