Skip to content

Commit

Permalink
Avoid double lookup in dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Henr1k80 committed Oct 21, 2024
1 parent 40ff62b commit 8688d5c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Shared/Server/MethodOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ private static void AddCompressionProviders(Dictionary<string, ICompressionProvi
{
foreach (var compressionProvider in compressionProviders)
{
if (!resolvedProviders.ContainsKey(compressionProvider.EncodingName))
{
resolvedProviders.Add(compressionProvider.EncodingName, compressionProvider);
}
resolvedProviders.TryAdd(compressionProvider.EncodingName, compressionProvider);
}
}
}
Expand Down

0 comments on commit 8688d5c

Please sign in to comment.