Index: pkg/http/lib/src/utils.dart |
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart |
index dd3547d54926e1c4ce7f09363084e58379405cd6..cc39d45a137489c5deac40640ae96ba1f86975ce 100644 |
--- a/pkg/http/lib/src/utils.dart |
+++ b/pkg/http/lib/src/utils.dart |
@@ -216,9 +216,7 @@ class Pair<E, F> { |
/// Configures [future] so that its result (success or exception) is passed on |
/// to [completer]. |
void chainToCompleter(Future future, Completer completer) { |
- future.then((v) => completer.complete(v)).catchError((error) { |
- completer.completeError(error); |
- }); |
+ future.then(completer.complete, onError: completer.completeError); |
} |
// TOOD(nweiz): Get rid of this once https://codereview.chromium.org/11293132/ |