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

Method push

publication/code/chapter04/infix_to_postfix.rs:19–22  ·  view source on GitHub ↗
(&mut self, val: T)

Source from the content-addressed store, hash-verified

17 }
18
19 fn push(&mut self, val: T) {
20 self.data.push(val);
21 self.top += 1;
22 }
23
24 fn pop(&mut self) -> Option<T> {
25 if 0 == self.top { return None; }

Callers 2

par_checker3Function · 0.45
infix_to_postfixFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected