fn traverse_lazy_tree<'a, V: Visitor>(t: &LazyTree<'a>, v: &mut V) -> Result<(), V::Output> {
    match t {
        LazyTree::Blob(b) => v.visit_blob(b),
        LazyTree::LazyBlob(thunk) => {
            let b = thunk();
            v.visit_blob(&b)
        }
        LazyTree::LazyFork(f) => {
            v.start_subtree()?;
            for l in f.labels() {
                match v.enter_edge(l.as_bytes())? {
                    Control::Skip => continue,
                    Control::Continue => {
                        let t = f.edge(&l).expect("fork edge disappeared");
                        traverse_lazy_tree(&t, v)?;
                    }
                }
            }
            v.end_subtree()
        }
    }
}
/// Traverses lazy tree using specified visitor.
Traverses lazy tree using specified visitor.
Traverses lazy tree using specified visitor .
fn traverse_lazy_tree<'a, V: Visitor>(t: &LazyTree<'a>, v: &mut V) -> Result<(), V::Output> {
    match t {
        LazyTree::Blob(b) => v.visit_blob(b),
        LazyTree::LazyBlob(thunk) => {
            let b = thunk();
            v.visit_blob(&b)
        }
        LazyTree::LazyFork(f) => {
            v.start_subtree()?;
            for l in f.labels() {
                match v.enter_edge(l.as_bytes())? {
                    Control::Skip => continue,
                    Control::Continue => {
                        let t = f.edge(&l).expect("fork edge disappeared");
                        traverse_lazy_tree(&t, v)?;
                    }
                }
            }
            v.end_subtree()
        }
    }
}
fn traverse_lazy_tree < ' a , V : Visitor > ( t : & LazyTree < ' a > , v : & mut V ) -> Result < ( ) , V :: Output > { match t { LazyTree :: Blob ( b ) => v . visit_blob ( b ) , LazyTree :: LazyBlob ( thunk ) => { let b = thunk ( ) ; v . visit_blob ( & b ) } LazyTree :: LazyFork ( f ) => { v . start_subtree ( ) ? ; for l in f . labels ( ) { match v . enter_edge ( l . as_bytes ( ) ) ? { Control :: Skip => continue , Control :: Continue => { let t = f . edge ( & l ) . expect ( " " ) ; traverse_lazy_tree ( & t , v ) ? ; } } } v . end_subtree ( ) } } }
Traverses lazy tree using specified visitor.
Traverses lazy tree using specified visitor .
t
&LazyTree<'a>
v
&mut V
t
&LazyTree<'a>
v
&mut V