| 1 | use crate::GlyphId; |
| 2 | use alloc::boxed::Box; |
| 3 | use core::{fmt, iter}; |
| 4 | |
| 5 | pub struct CodepointIdIter<'a> { |
| 6 | pub(crate) inner: Box<dyn Iterator<Item = (GlyphId, char)> + 'a>, |
| 7 | } |
| 8 | |
| 9 | impl<'a> Iterator for CodepointIdIter<'a> { |
| 10 | type Item = (GlyphId, char); |
| 11 | |
| 12 | #[inline ] |
| 13 | fn next(&mut self) -> Option<Self::Item> { |
| 14 | self.inner.next() |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | impl iter::FusedIterator for CodepointIdIter<'_> {} |
| 19 | |
| 20 | impl fmt::Debug for CodepointIdIter<'_> { |
| 21 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 22 | write!(f, "CodepointIdIter" ) |
| 23 | } |
| 24 | } |
| 25 | |