From 63b41691e64abc358872b8376f7b186d73622de8 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 31 Oct 2018 00:40:09 -0700 Subject: [PATCH] Clean up obsolete code. --- internal/server/search.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/server/search.go b/internal/server/search.go index 9aea30f7..7db6bd1f 100644 --- a/internal/server/search.go +++ b/internal/server/search.go @@ -371,14 +371,9 @@ func (server *Server) cmdNearby(msg *Message) (res resp.Value, err error) { if sw.col != nil { var matched uint32 iter := func(id string, o geojson.Object, fields []float64, dist *float64) bool { - // Calculate distance if we need to distance := 0.0 if s.distance { - if dist != nil { - distance = *dist - } else { - distance = o.Distance(s.obj) - } + distance = *dist } return sw.writeObject(ScanWriterParams{ id: id,