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

Unified Diff: utils/pub/utils.dart

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: utils/pub/utils.dart
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
index cb316cbebbb763b2fcd0724b029ec0e77189e62b..ae66c5ee0a339bd020ef68fce6d416d1afda7705 100644
--- a/utils/pub/utils.dart
+++ b/utils/pub/utils.dart
@@ -110,7 +110,7 @@ only(Iterable iter) {
/// Returns a set containing all elements in [minuend] that are not in
/// [subtrahend].
-Set setMinus(Collection minuend, Collection subtrahend) {
+Set setMinus(Iterable minuend, Iterable subtrahend) {
var minuendSet = new Set.from(minuend);
minuendSet.removeAll(subtrahend);
return minuendSet;
@@ -339,7 +339,7 @@ String urlDecode(String encoded) =>
Future awaitObject(object) {
// Unroll nested futures.
if (object is Future) return object.then(awaitObject);
- if (object is Collection) {
+ if (object is List || object is Set) {
nweiz 2013/04/11 20:36:19 I think this should be "object is Iterable".
Anders Johnsen 2013/04/12 09:31:14 Done.
return Future.wait(object.map(awaitObject).toList());
}
if (object is! Map) return new Future.immediate(object);
« tests/co19/co19-runtime.status ('K') | « tools/dom/templates/immutable_list_mixin.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698