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

Method pop

code/chapter03/par_checker2.rs:20–24  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

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

Callers 1

par_checker2Function · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected