Skip to content

Commit

Permalink
Remove short-circuits.
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Dec 2, 2020
1 parent 3454070 commit a9feaac
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/dbnode/storage/bootstrap/result/shard_ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ func (r shardTimeRanges) IsSuperset(other ShardTimeRanges) bool {
return true
}

// Short-circuit if we have more shards than other.
if len(r) < other.Len() {
return false
}

// Check if other ranges has any shards we do not have.
for shard := range other.Iter() {
if _, ok := r.Get(shard); !ok {
Expand All @@ -154,11 +149,6 @@ func (r shardTimeRanges) IsSuperset(other ShardTimeRanges) bool {
continue
}

// Short-circuit if we have more ranges than other.
if ranges.Len() < otherRanges.Len() {
return false
}

it := ranges.Iter()
otherIt := otherRanges.Iter()

Expand Down

0 comments on commit a9feaac

Please sign in to comment.