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

Unified Diff: utils/pub/path_source.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. 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
« no previous file with comments | « utils/pub/oauth2.dart ('k') | utils/pub/pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/path_source.dart
diff --git a/utils/pub/path_source.dart b/utils/pub/path_source.dart
index e849b6f793bd2064dd9e1cdd8afa47fb95d00260..e4d1f02ad724afb417ca36897d775cd5bb631c74 100644
--- a/utils/pub/path_source.dart
+++ b/utils/pub/path_source.dart
@@ -25,7 +25,7 @@ class PathSource extends Source {
final shouldCache = false;
Future<Pubspec> describe(PackageId id) {
- return new Future.of(() {
+ return new Future.sync(() {
_validatePath(id.name, id.description);
return new Pubspec.load(id.name, id.description["path"],
systemCache.sources);
@@ -40,7 +40,7 @@ class PathSource extends Source {
}
Future<bool> install(PackageId id, String destination) {
- return new Future.of(() {
+ return new Future.sync(() {
try {
_validatePath(id.name, id.description);
} on FormatException catch(err) {
« no previous file with comments | « utils/pub/oauth2.dart ('k') | utils/pub/pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698