oxilean_std/either/rightiter_traits.rs
1//! # RightIter - Trait Implementations
2//!
3//! This module contains trait implementations for `RightIter`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Iterator`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::types::{OxiEither, RightIter};
12
13impl<A, B, I: Iterator<Item = OxiEither<A, B>>> Iterator for RightIter<A, B, I> {
14 type Item = B;
15 fn next(&mut self) -> Option<B> {
16 loop {
17 match self.inner.next()? {
18 OxiEither::Left(_) => continue,
19 OxiEither::Right(b) => return Some(b),
20 }
21 }
22 }
23}