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

Unified Diff: utils/pub/version_solver.dart

Issue 11664006: Make Map.keys/values Iterables. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Add TODO that map.keys should return a Set. Created 7 years, 12 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 | « utils/pub/pubspec.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/version_solver.dart
diff --git a/utils/pub/version_solver.dart b/utils/pub/version_solver.dart
index 792c5e8851ca9fc3404a65b01f073895f5a00f40..f277169ffcf9fa61b9377ad467a7476d6193c9bd 100644
--- a/utils/pub/version_solver.dart
+++ b/utils/pub/version_solver.dart
@@ -502,7 +502,7 @@ class Dependency {
bool get isDependedOn => !_refs.isEmpty;
/// The names of all the packages that depend on this dependency.
- Collection<String> get dependers => _refs.keys;
+ Iterable<String> get dependers => _refs.keys;
/// Gets the overall constraint that all packages are placing on this one.
/// If no packages have a constraint on this one (which can happen when this
@@ -537,7 +537,7 @@ class Dependency {
for (var ref in refs) {
if (ref is RootSource) return ref;
}
- return refs[0];
+ return refs.first;
}
Dependency(this.name)
@@ -578,7 +578,7 @@ class Dependency {
String _requiredDepender() {
if (_refs.isEmpty) return null;
- var dependers = _refs.keys;
+ var dependers = _refs.keys.toList();
if (dependers.length == 1) {
var depender = dependers[0];
if (_refs[depender].source is RootSource) return null;
« no previous file with comments | « utils/pub/pubspec.dart ('k') | utils/pub/yaml/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698