Skip to content

Commit 5602350

Browse files
authored
Reduce delegate invocations and enumeration. (#28468)
1 parent cd5303d commit 5602350

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Http/Routing/src/EndpointNameAddressScheme.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ private static Dictionary<string, Endpoint[]> Initialize(IReadOnlyList<Endpoint>
7373
// OK we need to report some duplicates.
7474
var duplicates = endpoints
7575
.GroupBy(e => GetEndpointName(e))
76-
.Where(g => g.Key != null)
77-
.Where(g => g.Count() > 1);
76+
.Where(g => g.Key != null && g.Count() > 1);
7877

7978
var builder = new StringBuilder();
8079
builder.AppendLine(Resources.DuplicateEndpointNameHeader);

0 commit comments

Comments
 (0)