Skip to content

Commit 104a76c

Browse files
authored
fix incorrect conversion between int and int64 (#678)
1 parent 131aad3 commit 104a76c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rueidiscompat/command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,7 +4256,7 @@ type Document struct {
42564256
}
42574257

42584258
type FTSearchResult struct {
4259-
Total int
4259+
Total int64
42604260
Docs []Document
42614261
}
42624262

@@ -4338,7 +4338,7 @@ func (cmd *FTSearchCmd) from(res rueidis.RedisResult) {
43384338
cmd.SetErr(err)
43394339
return
43404340
}
4341-
ftSearchResult := FTSearchResult{Total: int(totalResults), Docs: make([]Document, 0, len(resultsArr))}
4341+
ftSearchResult := FTSearchResult{Total: totalResults, Docs: make([]Document, 0, len(resultsArr))}
43424342
for _, result := range resultsArr {
43434343
resultMap, err := result.ToMap()
43444344
if err != nil {
@@ -4485,7 +4485,7 @@ func (cmd *FTSearchCmd) from(res rueidis.RedisResult) {
44854485
results = append(results, doc)
44864486
}
44874487
cmd.SetVal(FTSearchResult{
4488-
Total: int(total),
4488+
Total: total,
44894489
Docs: results,
44904490
})
44914491
}

0 commit comments

Comments
 (0)