Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 522e9c8

Browse files
author
Yuncong Zhang
committed
Remove IEquatable.
1 parent b93f213 commit 522e9c8

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

Runtime/foundation/key.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22
using System.Collections.Generic;
33

44
namespace Unity.UIWidgets.foundation {
5-
public abstract class Key : IEquatable<Key> {
5+
public abstract class Key {
66
protected Key() {
77
}
88

99
public static Key key(string value) {
1010
return new ValueKey<string>(value);
1111
}
1212

13-
public virtual bool Equals(Key other) {
14-
return base.Equals(other);
15-
}
16-
1713
public static bool operator ==(Key left, Key right) {
1814
return Equals(left, right);
1915
}
@@ -35,24 +31,6 @@ public ValueKey(T value) {
3531

3632
public readonly T value;
3733

38-
public override bool Equals(Key other) {
39-
if (ReferenceEquals(null, other)) {
40-
return false;
41-
}
42-
43-
if (ReferenceEquals(this, other)) {
44-
return true;
45-
}
46-
47-
if (other.GetType() != typeof(ValueKey<T>)) {
48-
return false;
49-
}
50-
51-
ValueKey<T> valueKey = (ValueKey<T>) other;
52-
53-
return this.Equals(valueKey);
54-
}
55-
5634
public bool Equals(ValueKey<T> other) {
5735
if (ReferenceEquals(null, other)) {
5836
return false;

0 commit comments

Comments
 (0)