Commit 4151183e authored by Robert Griesemer's avatar Robert Griesemer

fix build: wrong godoc code submitted before

R=r
CC=golang-dev
https://golang.org/cl/5644044
parent 668418d1
...@@ -896,14 +896,14 @@ func (x *Index) Read(r io.Reader) error { ...@@ -896,14 +896,14 @@ func (x *Index) Read(r io.Reader) error {
x.snippets = fx.Snippets x.snippets = fx.Snippets
if fx.Fulltext { if fx.Fulltext {
x.fset = token.NewFileSet() x.fset = token.NewFileSet()
if err := x.fset.Read(r); err != nil {
return err
}
x.suffixes = new(suffixarray.Index)
decode := func(x interface{}) error { decode := func(x interface{}) error {
return gob.NewDecoder(r).Decode(x) return gob.NewDecoder(r).Decode(x)
} }
if err := x.suffixes.Read(decode); err != nil { if err := x.fset.Read(decode); err != nil {
return err
}
x.suffixes = new(suffixarray.Index)
if err := x.suffixes.Read(r); err != nil {
return err return err
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment