Helper function, which is used in both [`Frames`] and the mutable frame traversals on [`Report`]. [`Report`]: crate::Report To traverse the frames, the following algorithm is used: Given a list of iterators, take the last iterator, and use items from it until the iterator has been exhausted. If that is the case (it returned `None`), remove the iterator from the list, and continue with the next i
(iter: &mut Vec<I>)
| 31 | /// 8) Out: H Stack: - |
| 32 | /// ``` |
| 33 | pub(crate) fn next<I: Iterator<Item = T>, T>(iter: &mut Vec<I>) -> Option<T> { |
| 34 | let out; |
| 35 | loop { |
| 36 | let last = iter.last_mut()?; |
| 37 | |
| 38 | if let Some(next) = last.next() { |
| 39 | out = next; |
| 40 | break; |
| 41 | } |
| 42 | |
| 43 | // exhausted, therefore cannot be used anymore. |
| 44 | iter.pop(); |
| 45 | } |
| 46 | |
| 47 | Some(out) |
| 48 | } |
| 49 | |
| 50 | /// Iterator over the [`Frame`] stack of a [`Report`]. |
| 51 | /// |
no test coverage detected