Chromium Code Reviews| Index: pkg/yaml/lib/src/utils.dart |
| diff --git a/pkg/yaml/lib/src/utils.dart b/pkg/yaml/lib/src/utils.dart |
| index 64cad472704830ed7c5ac74e3ce58c1375a7b035..e485e6aeff546446e14edde6907be254dfebbb1e 100644 |
| --- a/pkg/yaml/lib/src/utils.dart |
| +++ b/pkg/yaml/lib/src/utils.dart |
| @@ -20,7 +20,9 @@ int hashCodeFor(obj) { |
| parents.add(value); |
| try { |
| if (value is Map) { |
| - return _hashCodeFor(value.keys) ^ _hashCodeFor(value.values); |
| + var equality = const SetEquality(); |
|
Jennifer Messerly
2014/05/20 22:51:25
maybe use UnorderedIterableEquality and avoid the
nweiz
2014/05/20 22:58:54
Oh, I missed that, good idea.
|
| + return equality.hash(value.keys.map(_hashCodeFor).toSet()) ^ |
| + equality.hash(value.values.map(_hashCodeFor).toSet()); |
| } else if (value is Iterable) { |
| return const IterableEquality().hash(value.map(hashCodeFor)); |
| } |