rabbitmq / rabbitmq-dotnet-client

RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.2+
https://www.rabbitmq.com/dotnet.html
Other
2.05k stars 575 forks source link

Avoid boxing in IEndpointResolverExtensions.cs #1619

Closed lechu445 closed 4 days ago

lechu445 commented 5 days ago

Proposed Changes

Technically T can be a value type. Object.Equals has an overload that takes object therefore any struct would be boxed. To avoid it, EqualityComparer<T>.Default.Equals should be used.

Types of Changes

Checklist

Further Comments