From f82a1fe4f2d07ecb26e0d1d57d13fcd27ad1d547 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Tue, 3 Apr 2018 18:17:02 +0530 Subject: [PATCH] Simplify stones counting. Signed-off-by: Goutham Veeramachaneni --- block.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block.go b/block.go index 19425ba4c..e3760df76 100644 --- a/block.go +++ b/block.go @@ -474,9 +474,7 @@ func (pb *Block) CleanTombstones(dest string, c Compactor) (bool, error) { numStones := 0 pb.tombstones.Iter(func(id uint64, ivs Intervals) error { - for range ivs { - numStones++ - } + numStones += len(ivs) return nil })