Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra test of comparer #112973

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override bool Contains(TSource value)
// source1.Contains(value) || source2.Contains(value), as Union's set semantics won't remove
// anything from either that could have matched. However, if there is a comparer, it's possible
// the Union could end up removing items that would have matched, and thus we can't skip it.
if (_comparer is null || _comparer == EqualityComparer<TSource>.Default)
if (_comparer is null)
{
IEnumerable<TSource>? source;
for (int i = 0; (source = GetEnumerable(i)) is not null; i++)
Expand Down
Loading