1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-23 19:42:51 +01:00
Minecraft-Phantom-Panel/Utils/Phantom.Utils/Collections/ReferenceEqualityComparer.cs

16 lines
378 B
C#

using System.Runtime.CompilerServices;
namespace Phantom.Utils.Collections;
public sealed class ReferenceEqualityComparer<T> : IEqualityComparer<T> {
public static readonly ReferenceEqualityComparer<T> Instance = new ();
public bool Equals(T? x, T? y) {
return ReferenceEquals(x, y);
}
public int GetHashCode(T obj) {
return RuntimeHelpers.GetHashCode(obj);
}
}