make the data: Vec<T> mutable, then reverse the vector so it can be used as a stack, and then use the ::pop() method to retrieve the item. This also avoid the constrain for Clone on T.