Adds the item to this stack.
(&mut self, v: T)
| 10 | impl<T> Stack<T> { |
| 11 | /// Adds the item to this stack. |
| 12 | pub fn push(&mut self, v: T) { |
| 13 | self.ll.push_front(v); |
| 14 | } |
| 15 | |
| 16 | /// Removes and returns the item most recently added to this stack. |
| 17 | pub fn pop(&mut self) -> Option<T> { |