Index: pkg/http/lib/src/utils.dart |
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart |
index 55444ecf235a5078b955898e24746e96f46714c5..26b8d0f386228aa865b97ee5f94d2376e75e010e 100644 |
--- a/pkg/http/lib/src/utils.dart |
+++ b/pkg/http/lib/src/utils.dart |
@@ -164,7 +164,7 @@ Future writeStreamToSink(Stream stream, EventSink sink) { |
} |
/// Returns a [Future] that asynchronously completes to `null`. |
-Future get async => new Future.immediate(null); |
+Future get async => new Future.value(); |
/// Returns a closed [Stream] with no elements. |
Stream get emptyStream => streamFromIterable([]); |
@@ -234,7 +234,7 @@ void chainToCompleter(Future future, Completer completer) { |
Future forEachFuture(Iterable input, Future fn(element)) { |
var iterator = input.iterator; |
Future nextElement(_) { |
- if (!iterator.moveNext()) return new Future.immediate(null); |
+ if (!iterator.moveNext()) return new Future.value(); |
return fn(iterator.current).then(nextElement); |
} |
return nextElement(null); |