syn
syn copied to clipboard
Punctuated::pop should return Option<T>, not Option<Pair<T, P>>
first(), last(), iter() also do not produce Pair. We make you explicitly ask for Pair by writing pairs() or pairs().next() or pairs().next_back(), since wanting the whole Pair is uncommon.
pop() should change as follows:
impl<T, P> Punctuated<T, P> {
- pub fn pop(&mut self) -> Option<Pair<T, P>>;
+ pub fn pop(&mut self) -> Option<T>;
+ pub fn pop_pair(&mut self) -> Option<Pair<T, P>>; // (?)
}