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

Unified Diff: pkg/serialization/lib/src/format.dart

Issue 12295009: Recommit changing List.skip/take/revert returns Iterable and remove mappedBy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make Future.wait simpler. Created 7 years, 10 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
Index: pkg/serialization/lib/src/format.dart
diff --git a/pkg/serialization/lib/src/format.dart b/pkg/serialization/lib/src/format.dart
index a1726f0f5b979a82627cc96c356a793509399ba9..68f609453db5b87c860f57cd3fdb3da3b14f7cd9 100644
--- a/pkg/serialization/lib/src/format.dart
+++ b/pkg/serialization/lib/src/format.dart
@@ -210,13 +210,13 @@ class SimpleJsonFormat extends Format {
// the data is shown to the user, so we destructively modify.
if (data is List) {
ruleNumber = data.last;
- data = data.take(data.length -1);
+ data = data.take(data.length - 1).toList();
} else if (data is Map) {
ruleNumber = data.remove(RULE);
} else {
throw new SerializationException("Invalid data format");
}
- // Do not use mappedBy or other lazy operations for this. They do not play
+ // Do not use map or other lazy operations for this. They do not play
// well with a function that destructively modifies its arguments.
var newData = mapValues(data, (each) => recursivelyFixUp(each, r, result));
result[ruleNumber].add(newData);

Powered by Google App Engine
This is Rietveld 408576698