fn size_hint(&self) -> (usize, Option<usize>) {
        if K == 0 {
            return (0, Some(0));
        }

        let max_size: usize = self
            .query_state
            .matched_archetypes
            .ones()
            .map(|index| self.world.archetypes[ArchetypeId::new(index)].len())
            .sum();

        if max_size < K {
            return (0, Some(0));
        }

        // n! / k!(n-k)! = (n*n-1*...*n-k+1) / k!
        let max_combinations = (0..K)
            .try_fold(1usize, |n, i| n.checked_mul(max_size - i))
            .map(|n| {
                let k_factorial: usize = (1..=K).product();
                n / k_factorial
            });

        (0, max_combinations)
    }
// NOTE: For unfiltered Queries this should actually return a exact size hint,
// to fulfil the ExactSizeIterator invariant, but this isn't practical without specialization.
// For more information see Issue #1686.
For unfiltered Queries this should actually return a exact size hint,
to fulfil the ExactSizeIterator invariant, but this isn't practical without specialization.
For more information see Issue #1686.
For unfiltered Queries this should actually return a exact size hint to fulfil the ExactSizeIterator invariant but this isn ' t practical without specialization . For more information see Issue #1686 .
fn size_hint(&self) -> (usize, Option<usize>) {
        if K == 0 {
            return (0, Some(0));
        }
        let max_size: usize = self
            .query_state
            .matched_archetypes
            .ones()
            .map(|index| self.world.archetypes[ArchetypeId::new(index)].len())
            .sum();
        if max_size < K {
            return (0, Some(0));
        }
        // n! / k!(n-k)! = (n*n-1*...*n-k+1) / k!
        let max_combinations = (0..K)
            .try_fold(1usize, |n, i| n.checked_mul(max_size - i))
            .map(|n| {
                let k_factorial: usize = (1..=K).product();
                n / k_factorial
            });
        (0, max_combinations)
    }
fn size_hint ( & self ) -> ( usize , Option < usize > ) { if K == 0 { return ( 0 , Some ( 0 ) ) ; } let max_size : usize = self . query_state . matched_archetypes . ones ( ) . map ( | index | self . world . archetypes [ ArchetypeId :: new ( index ) ] . len ( ) ) . sum ( ) ; if max_size < K { return ( 0 , Some ( 0 ) ) ; } // n! / k!(n-k)! = (n*n-1*...*n-k+1) / k! let max_combinations = ( 0 .. K ) . try_fold ( 1usize , | n , i | n . checked_mul ( max_size - i ) ) . map ( | n | { let k_factorial : usize = ( 1 ..= K ) . product ( ) ; n / k_factorial } ) ; ( 0 , max_combinations ) }
NOTE: For unfiltered Queries this should actually return a exact size hint,
to fulfil the ExactSizeIterator invariant, but this isn't practical without specialization.
NOTE : For unfiltered Queries this should actually return a exact size hint to fulfil the ExactSizeIterator invariant but this isn ' t practical without specialization .
&self
&self