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
[x] Bug fix (non-breaking change which fixes issue #NNNN)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause an observable behavior change in existing systems)
[ ] Documentation improvements (corrections, new content, etc)
Proposed Changes
Technically T can be a value type.
Object.Equals
has an overload that takesobject
therefore any struct would be boxed. To avoid it,EqualityComparer<T>.Default.Equals
should be used.Types of Changes
Checklist
CONTRIBUTING.md
documentFurther Comments