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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 1101343004: Fix all the analysis hints in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 14d81a67a4138ea4e2c6aac75429c1a6cc05a132..d0eb936f7f818d5e0b4eac6013e3952cbb251cd0 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -371,6 +371,16 @@ Future<Map> mapFromIterableAsync(Iterable iter, {key(element),
})).then((_) => map);
}
+/// Returns a new map with all entries in both [map1] and [map2].
+///
+/// If there are overlapping keys, [map2]'s value wins.
+Map mergeMaps(Map map1, Map map2) {
+ var result = {};
+ result.addAll(map1);
+ result.addAll(map2);
+ return result;
+}
+
/// Returns the transitive closure of [graph].
///
/// This assumes [graph] represents a graph with a vertex for each key and an
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/solver/version_solver.dart ('k') | sdk/lib/_internal/pub/lib/src/validator/dependency.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698