fn visit<F>(&mut self, g: &Graph, start: &str, end: &str, mut visit: F)
        where F: FnMut(Subpath)
    {
        let start = &name_trans(start);
        let end = &name_trans(end);
        self.push(g, start, end);
        while let Some(node) = self.stack.pop() {
            self.push(g, &node, end);
            let top = self.status.top().expect("empty status right after push");
            if top.1 == 0 || &node == end {
                'popping: while self.status.len() > 0 {
                    let top = self.status.top().unwrap();
                    if top.1 <= 1 {
                        let (top, _, _) = self.status.pop().unwrap();
                        // Need to visit all paths, so we couldn't really memoize anything
                        // other than the entire path set. Visit only complete subpaths.
                        if &top == end {
                            visit(Subpath(self.status.path.0.clone() + &top));
                        }
                    } else {
                        *self.status.child_counts.last_mut().unwrap() -= 1;
                        break 'popping;
                    }
                }
            }
        }
    }
// Visit all paths from start to end.
Visit all paths from start to end.
Visit all paths from start to end .
fn visit<F>(&mut self, g: &Graph, start: &str, end: &str, mut visit: F)
        where F: FnMut(Subpath)
    {
        let start = &name_trans(start);
        let end = &name_trans(end);
        self.push(g, start, end);
        while let Some(node) = self.stack.pop() {
            self.push(g, &node, end);
            let top = self.status.top().expect("empty status right after push");
            if top.1 == 0 || &node == end {
                'popping: while self.status.len() > 0 {
                    let top = self.status.top().unwrap();
                    if top.1 <= 1 {
                        let (top, _, _) = self.status.pop().unwrap();
                        // Need to visit all paths, so we couldn't really memoize anything
                        // other than the entire path set. Visit only complete subpaths.
                        if &top == end {
                            visit(Subpath(self.status.path.0.clone() + &top));
                        }
                    } else {
                        *self.status.child_counts.last_mut().unwrap() -= 1;
                        break 'popping;
                    }
                }
            }
        }
    }
fn visit < F > ( & mut self , g : & Graph , start : & str , end : & str , mut visit : F ) where F : FnMut ( Subpath ) { let start = & name_trans ( start ) ; let end = & name_trans ( end ) ; self . push ( g , start , end ) ; while let Some ( node ) = self . stack . pop ( ) { self . push ( g , & node , end ) ; let top = self . status . top ( ) . expect ( " " ) ; if top . 1 == 0 || & node == end { ' popping : while self . status . len ( ) > 0 { let top = self . status . top ( ) . unwrap ( ) ; if top . 1 <= 1 { let ( top , _ , _ ) = self . status . pop ( ) . unwrap ( ) ; // Need to visit all paths, so we couldn't really memoize anything // other than the entire path set. Visit only complete subpaths. if & top == end { visit ( Subpath ( self . status . path . 0 . clone ( ) + & top ) ) ; } } else { * self . status . child_counts . last_mut ( ) . unwrap ( ) -= 1 ; break ' popping ; } } } } }
Visit all paths from start to end.
Visit all paths from start to end .
&mut self
g
&Graph
start
&str
end
&str
visit
F