fn new() -> Trie {
        let mut trie = Trie {
            nodes: vec![],
            counts: vec![],
        };
        // add dummy node with id==0. This is never used. We explicitly add it
        // to avoid needing to subtract 1 on every node lookup. The root starts
        // at id==1.
        trie.nodes.extend(std::iter::repeat(None).take(NODE_SIZE));
        trie.counts.push(0);
        trie.alloc_node(); // root node
        trie
    }
/// Create a new empty trie.
Create a new empty trie.
Create a new empty trie .
fn new() -> Trie {
        let mut trie = Trie {
            nodes: vec![],
            counts: vec![],
        };
        // add dummy node with id==0. This is never used. We explicitly add it
        // to avoid needing to subtract 1 on every node lookup. The root starts
        // at id==1.
        trie.nodes.extend(std::iter::repeat(None).take(NODE_SIZE));
        trie.counts.push(0);
        trie.alloc_node(); // root node
        trie
    }
fn new ( ) -> Trie { let mut trie = Trie { nodes : vec ! [ ] , counts : vec ! [ ] , } ; // add dummy node with id==0. This is never used. We explicitly add it // to avoid needing to subtract 1 on every node lookup. The root starts // at id==1. trie . nodes . extend ( std :: iter :: repeat ( None ) . take ( NODE_SIZE ) ) ; trie . counts . push ( 0 ) ; trie . alloc_node ( ) ; // root node trie }
Create a new empty trie.
Create a new empty trie .