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

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

Issue 12401002: Make List.from and Iterable.toList default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/src/serialization_helpers.dart
diff --git a/pkg/serialization/lib/src/serialization_helpers.dart b/pkg/serialization/lib/src/serialization_helpers.dart
index 6ce5f7642f2405cf0000802385ead4a6ead3017b..9568c24dee7db223fe32fb46df89a1c06c8d0da3 100644
--- a/pkg/serialization/lib/src/serialization_helpers.dart
+++ b/pkg/serialization/lib/src/serialization_helpers.dart
@@ -20,10 +20,10 @@ doNothing(x) => x;
// TODO(alanknight): Remove once issue 5342 is resolved.
Iterable append(Iterable a, Iterable b) {
if (a == null) {
- return (b == null) ? [] : new List.from(b, growable: true);
+ return (b == null) ? [] : new List.from(b);
}
- if (b == null) return new List.from(a, growable: true);
- var result = new List.from(a, growable: true);
+ if (b == null) return new List.from(a);
+ var result = new List.from(a);
result.addAll(b);
return result;
}
@@ -132,7 +132,7 @@ values(x) {
mapValues(x, f) {
if (x is Set) return x.map(f).toSet();
- if (x is Iterable) return x.map(f).toList(growable: true);
+ if (x is Iterable) return x.map(f).toList();
if (x is Map) return new ListLikeIterable(x).map(f);
throw new ArgumentError("Invalid argument");
}
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | runtime/lib/array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698