com.wallstop-studios.unity-helpers 1.0.1-rc02 → 1.0.1-rc03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
public static bool ContentEquals<K, V>(
|
|
184
|
-
this IReadOnlyDictionary<K, V> dictionary, IReadOnlyDictionary<K, V> other)
|
|
184
|
+
this IReadOnlyDictionary<K, V> dictionary, IReadOnlyDictionary<K, V> other) where V : IEquatable<V>
|
|
185
185
|
{
|
|
186
186
|
if (ReferenceEquals(dictionary, other))
|
|
187
187
|
{
|
|
@@ -193,12 +193,8 @@
|
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return !dictionary.Except(other).Any();
|
|
196
|
+
return dictionary.Count == other.Count && dictionary.All(
|
|
197
|
+
kvp => other.TryGetValue(kvp.Key, out V value) && kvp.Value.Equals(value));
|
|
202
198
|
}
|
|
203
199
|
|
|
204
200
|
public static void Deconstruct<K, V>(this KeyValuePair<K, V> kvp, out K key, out V value)
|