fluent-iterable 1.0.1

Fluent extension trait for std Iterator, port of @codibre/fluent-iterable vocabulary: joins, grouping, distinctness, cardinality checks
Documentation
// Test support: counts how many items an inner iterator produced.
    use std::cell::Cell;
    use std::iter::FromIterator;
    use std::rc::Rc;
    /// Counts how many items the wrapped iterator ever yielded — proof of
    /// short-circuiting for the lazy/terminal checks.
    struct Counting<I: Iterator> {
        inner: I,
        yielded: Rc<Cell<usize>>,
    }
    impl<I: Iterator> Iterator for Counting<I> {
        type Item = I::Item;
        fn next(&mut self) -> Option<I::Item> {
            let item = self.inner.next();
            if item.is_some() {
                self.yielded.set(self.yielded.get() + 1);
            }
            item
        }
    }
    fn counting<I: Iterator>(inner: I) -> (Counting<I>, Rc<Cell<usize>>) {
        let counter = Rc::new(Cell::new(0));
        (
            Counting {
                inner,
                yielded: Rc::clone(&counter),
            },
            counter,
        )
    }
    // ---- ported from the proven mq crate ----