pub fn walk<CB>(&self, env: &Environment<'cx>, mut callback: CB)
    where
        CB: FnMut(Point, Option<&repr::Action>, &[&Loan]),
    {
        let mut loans = Vec::with_capacity(self.loans.len());
        let mut bits = self.loans_in_scope_after_block.empty_buf();
        for &block in &env.reverse_post_order {
            self.simulate_block(&mut bits, block, |point, action, bits| {
                // Convert from the bitset into a vector of references to loans.
                loans.clear();
                loans.extend(self.loans.iter().enumerate().filter_map(
                    |(loan_index, loan)| if bits.get(loan_index) {
                        Some(loan)
                    } else {
                        None
                    },
                ));

                // Invoke the callback.
                callback(point, action, &loans);
            });
        }
    }
/// Invokes `callback` with the loans in scope at each point.
Invokes `callback` with the loans in scope at each point.
Invokes ` callback ` with the loans in scope at each point .
pub fn walk<CB>(&self, env: &Environment<'cx>, mut callback: CB)
    where
        CB: FnMut(Point, Option<&repr::Action>, &[&Loan]),
    {
        let mut loans = Vec::with_capacity(self.loans.len());
        let mut bits = self.loans_in_scope_after_block.empty_buf();
        for &block in &env.reverse_post_order {
            self.simulate_block(&mut bits, block, |point, action, bits| {
                // Convert from the bitset into a vector of references to loans.
                loans.clear();
                loans.extend(self.loans.iter().enumerate().filter_map(
                    |(loan_index, loan)| if bits.get(loan_index) {
                        Some(loan)
                    } else {
                        None
                    },
                ));
                // Invoke the callback.
                callback(point, action, &loans);
            });
        }
    }
pub fn walk < CB > ( & self , env : & Environment < ' cx > , mut callback : CB ) where CB : FnMut ( Point , Option < & repr :: Action > , & [ & Loan ] ) , { let mut loans = Vec :: with_capacity ( self . loans . len ( ) ) ; let mut bits = self . loans_in_scope_after_block . empty_buf ( ) ; for & block in & env . reverse_post_order { self . simulate_block ( & mut bits , block , | point , action , bits | { // Convert from the bitset into a vector of references to loans. loans . clear ( ) ; loans . extend ( self . loans . iter ( ) . enumerate ( ) . filter_map ( | ( loan_index , loan ) | if bits . get ( loan_index ) { Some ( loan ) } else { None } , ) ) ; // Invoke the callback. callback ( point , action , & loans ) ; } ) ; } }
Invokes `callback` with the loans in scope at each point.
Invokes ` callback ` with the loans in scope at each point .
&self
env
&Environment<'cx>
callback
CB
&self
env
&Environment<'cx>
callback
CB