nickva commented on a change in pull request #586: Avoid using length to detect 
non empty list
URL: https://github.com/apache/couchdb/pull/586#discussion_r120696388
 
 

 ##########
 File path: src/mango/src/mango_selector.erl
 ##########
 @@ -564,5 +564,5 @@ match({[{Field, Cond}]}, Value, Cmp) ->
             match(Cond, SubValue, Cmp)
     end;
 
-match({Props} = Sel, _Value, _Cmp) when length(Props) > 1 ->
+match({[_ | _] = _Props} = Sel, _Value, _Cmp) ->
 
 Review comment:
   Same as previous comment `[_, _ | _]` vs `[_ | _]`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to