You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several methods were called for the _shards variable. The last invocation looks suspicious.
Add and UnionWith are methods of the HashSet<T> type. They change the _shards object state. But Union is the extension method which does not change the _shards state. The result of this invocation is not used as well.
The text was updated successfully, but these errors were encountered:
VasilievSerg
changed the title
Incorrect invocation of the 'IEnumerable<T>.Union' method
Suspicious invocation of the 'IEnumerable<T>.Union' method
Apr 21, 2022
Hi,
I found the suspicious code via the PVS-Studio analyzer.
Here is the code:
Here is the link to the sources.
Several methods were called for the
_shards
variable. The last invocation looks suspicious.Add
andUnionWith
are methods of theHashSet<T>
type. They change the_shards
object state. ButUnion
is the extension method which does not change the_shards
state. The result of this invocation is not used as well.The text was updated successfully, but these errors were encountered: