diff --git a/internal/eval/eval_test.go b/internal/eval/eval_test.go index 63327fa9b..73be73400 100644 --- a/internal/eval/eval_test.go +++ b/internal/eval/eval_test.go @@ -9250,7 +9250,7 @@ func testEvalGEORADIUSBYMEMBER(t *testing.T, store *dstore.Store) { }, "GEORADIUSBYMEMBER wrong type operation": { setup: func() { - store.Put("wrongtype", store.NewObj("string_value", -1, object.ObjTypeString, object.ObjEncodingRaw)) + store.Put("wrongtype", store.NewObj("string_value", -1, object.ObjTypeString)) }, input: []string{"wrongtype", "wtc one", "7", "km"}, migratedOutput: EvalResponse{ diff --git a/internal/eval/geo/geo.go b/internal/eval/geo/geo.go index de21193d6..0cfd2e776 100644 --- a/internal/eval/geo/geo.go +++ b/internal/eval/geo/geo.go @@ -228,7 +228,7 @@ func Area(centerHash, radius float64) (result [9]uint64, steps uint8) { steps = geohashEstimateStepsByRadius(radius, centerLat) centerRadiusHash := encodeHash(centerLon, centerLat, steps) - neighbors := geohashNeighbors(uint64(centerRadiusHash), steps) + neighbors := geohashNeighbors(centerRadiusHash, steps) area := areaBySteps(centerRadiusHash, steps) /* Check if the step is enough at the limits of the covered area. @@ -290,7 +290,7 @@ func Area(centerHash, radius float64) (result [9]uint64, steps uint8) { // HashMinMax returns the min and max hashes for a given hash and steps. This can be used to get the range of hashes // that a given hash and a radius (steps) will cover. -func HashMinMax(hash uint64, steps uint8) (minHash uint64, maxHash uint64) { +func HashMinMax(hash uint64, steps uint8) (minHash, maxHash uint64) { minHash = align52Bits(hash, steps) hash++ maxHash = align52Bits(hash, steps) diff --git a/internal/eval/sortedset/sorted_set.go b/internal/eval/sortedset/sorted_set.go index 715914543..cde8e575f 100644 --- a/internal/eval/sortedset/sorted_set.go +++ b/internal/eval/sortedset/sorted_set.go @@ -313,7 +313,6 @@ func DeserializeSortedSet(buf *bytes.Reader) (*Set, error) { // GetScoreRange returns a slice of members with scores between min and max, inclusive. // If withScores is true, the members will be returned with their scores. func (ss *Set) GetMemberScoresInRange(minScore, maxScore float64, count, maxCount int) (members []string, scores []float64) { - iterFunc := func(item btree.Item) bool { ssi := item.(*Item) if ssi.Score < minScore {