multipeek
multipeek copied to clipboard
Make MultiPeek consistent with Peekable
MultiPeek is missing 2 methods from Peekable: next_if and next_if_eq. This pull request adds those two methods and two additional ones: nth_if and nth_if_eq. This will make MultiPeek a drop-in replacement for Peekable in the standard library.
Description of changes: Added next_if, nth_if, next_if_eq and nth_if_eq.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
I just realised that this is not enough; peek_mut (and peek_nth_mut) are also required. I'll add them to the PR in the morning.
I've now added the two methods that were missing