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

Unified Diff: sdk/lib/collection/queue.dart

Issue 2467113003: Make EfficientLength extend Iterable. (Closed)
Patch Set: Reverted, prepare to reland. Make new test not break web-testing framework. Created 4 years, 1 month 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 | « sdk/lib/collection/maps.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/queue.dart
diff --git a/sdk/lib/collection/queue.dart b/sdk/lib/collection/queue.dart
index 386cf50a03b6f36dcbceb28107c4063ea7bdf253..2e6a24afa2ec7848c0a22513dbb6553aaff53f1f 100644
--- a/sdk/lib/collection/queue.dart
+++ b/sdk/lib/collection/queue.dart
@@ -17,7 +17,7 @@ part of dart.collection;
* This goes both for using the [iterator] directly, or for iterating an
* `Iterable` returned by a method like [map] or [where].
*/
-abstract class Queue<E> implements Iterable<E>, EfficientLength {
+abstract class Queue<E> implements EfficientLengthIterable<E> {
/**
* Creates a queue.
@@ -487,7 +487,7 @@ class ListQueue<E> extends ListIterable<E> implements Queue<E> {
return queue;
} else {
int capacity = _INITIAL_CAPACITY;
- if (elements is EfficientLength) {
+ if (elements is EfficientLengthIterable) {
capacity = elements.length;
}
ListQueue<E> result = new ListQueue<E>(capacity);
« no previous file with comments | « sdk/lib/collection/maps.dart ('k') | sdk/lib/collection/splay_tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698