Open Wilfred opened 2 years ago
I find myself doing this a lot:
match foo.peek() { Some(head) => { foo = foo.pop().unwrap(); } }
As far as I can see, there isn't a single API for popping an item and returning it. Would it make sense to add one?
(I'm sure you can think of a better name if you do add this.)
I find myself doing this a lot:
As far as I can see, there isn't a single API for popping an item and returning it. Would it make sense to add one?
(I'm sure you can think of a better name if you do add this.)