From c1509918011e47b79b0b84282ceaa88a29d5db1b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 17 Mar 2025 15:38:57 +0100 Subject: [PATCH] core/filtermaps: remove tautological nil check nextRes is nil-checked in the condition above, no need to do it again. --- core/filtermaps/matcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/filtermaps/matcher.go b/core/filtermaps/matcher.go index 973b071937..79ee5c7d33 100644 --- a/core/filtermaps/matcher.go +++ b/core/filtermaps/matcher.go @@ -832,7 +832,7 @@ func (params *Params) matchResults(mapIndex uint32, offset uint64, baseRes, next // result equals baseRes. return baseRes } - if baseRes == nil || (nextRes != nil && len(nextRes) == 0) { + if baseRes == nil || len(nextRes) == 0 { // if baseRes is a wild card or nextRes is empty then the sequence matcher // result is the items of nextRes with a negative offset applied. result := make(potentialMatches, 0, len(nextRes))