This project embodies an attempt to create a Discord/IRC (and possibly more extensible) bridge. Not finished.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
689 B

// TODO: Fix lifetimes
pub struct DummyIter<'a, Iter, Item: 'a, Dummy> where
Iter: Iterator<Item = Item>
{
iter: Iter,
dummy: Dummy,
_phantom: core::marker::PhantomData<&'a ()>,
}
impl<'a, Iter, Item: 'a, Dummy> DummyIter<'a, Iter, Item, Dummy> where
Iter: Iterator<Item = Item>
{
pub fn new(iter: Iter, dummy: Dummy) -> DummyIter<'a, Iter, Item, Dummy>
{
DummyIter
{
iter: iter,
dummy: dummy,
_phantom: core::marker::PhantomData,
}
}
}
impl<'a, Iter, Item: 'a, Dummy> Iterator for DummyIter<'a, Iter, Item, Dummy> where
Iter: Iterator<Item = Item>
{
type Item = Item;
fn next(&mut self) -> Option<Item>
{
self.iter.next()
}
}