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

Unified Diff: utils/pub/pub.dart

Issue 12042053: Get rid of unneeded Future.immediate() calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index ac700f9b0de439d4c1e31ad157f806abaa6e4e62..adfcb8360de02bc51d6d372eaabe596518d1b906 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -246,16 +246,14 @@ abstract class PubCommand {
this.entrypoint = entrypoint;
try {
var commandFuture = onRun();
- if (commandFuture == null) return new Future.immediate(true);
+ if (commandFuture == null) return true;
return commandFuture;
} catch (error, trace) {
handleError(error, trace);
- return new Future.immediate(null);
}
});
-
future
.then((_) => cache_.deleteTempDir())
.catchError((asyncError) {

Powered by Google App Engine
This is Rietveld 408576698