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

Unified Diff: utils/pub/git_source.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/git_source.dart
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 0a3e2b9721f09b459e551eb147192759f2719dea..477cc17a7e9bd17ed250476516aed5e259e423f4 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -49,11 +49,11 @@ class GitSource extends Source {
revisionCachePath = path;
return exists(revisionCachePath);
}).then((exists) {
- if (exists) return new Future.immediate(null);
+ if (exists) return;
return _clone(_repoCachePath(id), revisionCachePath, mirror: false);
}).then((_) {
var ref = _getEffectiveRef(id);
- if (ref == 'HEAD') return new Future.immediate(null);
+ if (ref == 'HEAD') return;
return _checkOut(revisionCachePath, ref);
}).then((_) {
return Package.load(id.name, revisionCachePath, systemCache.sources);
« utils/pub/entrypoint.dart ('K') | « utils/pub/git.dart ('k') | utils/pub/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698