Remove pointer indirection by changing Chunk definition

This commit is contained in:
Junegunn Choi committed 2017-07-16 23:34:32 +09:00
1 parent 7b5ccc45bc
commit d4f3d5a164
7 files changed
+29 -23

No files matched your search

+2 -2
View File
@@ -11,8 +11,8 @@ func TestChunkList(t *testing.T) {
// FIXME global
sortCriteria = []criterion{byScore, byLength}
cl := NewChunkList(func(s []byte, i int) *Item {
return &Item{text: util.ToChars(s), index: int32(i * 2)}
cl := NewChunkList(func(s []byte, i int) Item {
return Item{text: util.ToChars(s), index: int32(i * 2)}
})
// Snapshot