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

Unified Diff: utils/pub/io.dart

Issue 13196007: Replace defer() with Future.of in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/hosted_source.dart ('k') | utils/pub/oauth2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 7848915628c84a57047b05ec5dddfccdf86b7653..0af650bda17e36943bffb7cebc344503f6bb4bbb 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -550,7 +550,7 @@ Future timeout(Future input, int milliseconds, String description) {
/// Returns a future that completes to the value that the future returned from
/// [fn] completes to.
Future withTempDir(Future fn(String path)) {
- return defer(() {
+ return new Future.of(() {
var tempDir = createTempDir();
return new Future.of(() => fn(tempDir))
.whenComplete(() => deleteEntry(tempDir));
« no previous file with comments | « utils/pub/hosted_source.dart ('k') | utils/pub/oauth2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698