fn next(&mut self) -> Option<Self::Item> {
        let rank = self.polytope.rank();

        // The first flag is a special case.
        if !self.first {
            self.first = true;

            let flag = Some(FlagEvent::Flag(self.found.keys().next().cloned().unwrap()));

            // If we're dealing with a point, or if we're performing no flag
            // changes, this is the only flag.
            if rank <= 1 || self.flag_changes.is_empty() {
                self.queue = VecDeque::new();
            }

            return flag;
        }

        // Loops until we get a new flag event.
        loop {
            match self.try_next() {
                // We found a new flag event.
                FlagNext::New(flag_event) => {
                    return Some(flag_event);
                }

                // We already exhausted the flag supply.
                FlagNext::None => return None,

                // Repeat flag, try again.
                FlagNext::Repeat => {}
            }
        }
    }
/// Gets the next flag event.
Gets the next flag event.
Gets the next flag event .
fn next(&mut self) -> Option<Self::Item> {
        let rank = self.polytope.rank();
        // The first flag is a special case.
        if !self.first {
            self.first = true;
            let flag = Some(FlagEvent::Flag(self.found.keys().next().cloned().unwrap()));
            // If we're dealing with a point, or if we're performing no flag
            // changes, this is the only flag.
            if rank <= 1 || self.flag_changes.is_empty() {
                self.queue = VecDeque::new();
            }
            return flag;
        }
        // Loops until we get a new flag event.
        loop {
            match self.try_next() {
                // We found a new flag event.
                FlagNext::New(flag_event) => {
                    return Some(flag_event);
                }
                // We already exhausted the flag supply.
                FlagNext::None => return None,
                // Repeat flag, try again.
                FlagNext::Repeat => {}
            }
        }
    }
fn next ( & mut self ) -> Option < Self :: Item > { let rank = self . polytope . rank ( ) ; // The first flag is a special case. if ! self . first { self . first = true ; let flag = Some ( FlagEvent :: Flag ( self . found . keys ( ) . next ( ) . cloned ( ) . unwrap ( ) ) ) ; // If we're dealing with a point, or if we're performing no flag // changes, this is the only flag. if rank <= 1 || self . flag_changes . is_empty ( ) { self . queue = VecDeque :: new ( ) ; } return flag ; } // Loops until we get a new flag event. loop { match self . try_next ( ) { // We found a new flag event. FlagNext :: New ( flag_event ) => { return Some ( flag_event ) ; } // We already exhausted the flag supply. FlagNext :: None => return None , // Repeat flag, try again. FlagNext :: Repeat => { } } } }
Gets the next flag event.
Gets the next flag event .
&mut self
&mut self