Skip to content

Commit 8f21d41

Browse files
author
Ryan Nowak
committed
lol
1 parent d8af75e commit 8f21d41

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Http/Routing/src/Matching/CandidateSet.cs

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public CandidateSet(Endpoint[] endpoints, RouteValueDictionary[] values, int[] s
6464
}
6565
}
6666

67+
// Used in tests.
6768
internal CandidateSet(Candidate[] candidates)
6869
{
6970
Candidates = new CandidateState[candidates.Length];

src/Http/Routing/src/Matching/DfaMatcher.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,17 @@ public sealed override Task MatchAsync(HttpContext httpContext, EndpointSelector
183183

184184
if (policyCount == 0 && _isDefaultEndpointSelector)
185185
{
186-
// Fast path that avoids allocating the candidate set. We can use this when there
187-
// are no policies.
186+
// Fast path that avoids allocating the candidate set.
187+
//
188+
// We can use this when there are no policies and we're using the default selector.
188189
DefaultEndpointSelector.Select(httpContext, context, candidateState);
189190
return Task.CompletedTask;
190191
}
191192
else if (policyCount == 0)
192193
{
193-
// Fast path that avoids state machine when there are no policies.
194+
// Fast path that avoids a state machine.
195+
//
196+
// We can use this when there are no policies and a non-default selector.
194197
return _selector.SelectAsync(httpContext, context, new CandidateSet(candidateState));
195198
}
196199

0 commit comments

Comments
 (0)