Tawmy/Leyla.Bot

(CS-R1033) Consider inverting the predicate to simplify `!Any()` call

Closed this issue · 0 comments

Tawmy commented

Description

Any() call takes a predicate that checks if an element exists satisfying the predicate. Prefixing this call with ! checks for the opposite. However, this entire expression can be simplified by inverting the predicate and using the All() call.

Occurrences

There are 2 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Leyla-Labs/Leyla.Bot/issue/CS-R1033/occurrences/