Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1546)

Unified Diff: lib/src/equality.dart

Issue 2898693002: Make Equality.hash accept null as an argument. (Closed)
Patch Set: Fix typo. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/equality.dart
diff --git a/lib/src/equality.dart b/lib/src/equality.dart
index a97066407a6d7ff978364dce9fc10254b7178876..2c6c272c206ee4e7253334559962e8bc71bda4f4 100644
--- a/lib/src/equality.dart
+++ b/lib/src/equality.dart
@@ -164,7 +164,7 @@ class ListEquality<E> implements Equality<List<E>> {
}
int hash(List<E> list) {
- if (elements == null) return null.hashCode;
+ if (list == null) return null.hashCode;
// Jenkins's one-at-a-time hash function.
// This code is almost identical to the one in IterableEquality, except
// that it uses indexing instead of iterating to get the elements.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698