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

Method push

code/chapter03/infix_to_postfix.rs:17–20  ·  view source on GitHub ↗
(&mut self, val: T)

Source from the content-addressed store, hash-verified

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

Callers 2

par_checker3Function · 0.45
infix_to_postfixFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected