Skip to content

Commit

Permalink
perf(CA1860): prefer comparing count to 0 vs using Any()
Browse files Browse the repository at this point in the history
  • Loading branch information
skwasjer committed Dec 15, 2024
1 parent 6407054 commit ec33ba1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal static class HeaderDictionaryExtensions
throw new ArgumentNullException(nameof(acceptedHeaders));
}

if (!acceptedHeaders.Any())
if (acceptedHeaders.Count == 0)
{
return new KeyValuePair<string, string?>(CorrelationHttpHeaders.CorrelationId, null);
}
Expand Down

0 comments on commit ec33ba1

Please sign in to comment.