diff --git a/tree/tried/tried.go b/tree/tried/tried.go index 3150406..a4b5e0a 100644 --- a/tree/tried/tried.go +++ b/tree/tried/tried.go @@ -27,7 +27,6 @@ type Node struct { func New() *Tried { tried := &Tried{} tried.root = new(Node) - tried.wiStore = WordIndexDict[WordIndexLower] return tried } diff --git a/tree/tried/tried_test.go b/tree/tried/tried_test.go index 5cbd88a..a92e15f 100644 --- a/tree/tried/tried_test.go +++ b/tree/tried/tried_test.go @@ -317,7 +317,10 @@ func TesStoreData(t *testing.T) { func Load() []string { var result []string - f, _ := os.Open("tried.log") + f, err := os.Open("tried.log") + if err != nil { + panic("先执行TesStoreData 然后再测试Benchmark") + } gob.NewDecoder(f).Decode(&result) return result }