Index: utils/pub/utils.dart |
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart |
index 1ab0bc6cdc1b06e68439de4c78005432171a831d..e605579417e03737af720af397a178cef7321229 100644 |
--- a/utils/pub/utils.dart |
+++ b/utils/pub/utils.dart |
@@ -118,26 +118,6 @@ void chainToCompleter(Future future, Completer completer) { |
onError: (e) => completer.completeError(e.error, e.stackTrace)); |
} |
-// TODO(nweiz): remove this when issue 7790 is fixed. |
-/// Like [Future.whenComplete], except that [action] may return a [Future]. If |
-/// it does, the returned [Future] won't complete until [action]'s [Future] |
-/// completes. |
-/// |
-/// The returned [Future] always has the same value as [future]. |
-Future asyncWhenComplete(Future future, Future action()) { |
- Future futurify(Future future) { |
- if (future != null) return future; |
- return new Future.immediate(null); |
- } |
- |
- return future.then((result) => futurify(action()).then((_) => result), |
- onError: (e) { |
- return futurify(action()).then((_) { |
- throw e; |
- }); |
- }); |
-} |
- |
// TODO(nweiz): unify the following functions with the utility functions in |
// pkg/http. |