| Index: sdk/lib/io/file_impl.dart
|
| diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
|
| index 65f7adfb75586a616a00fd4efb56aed66726a9ea..95dfc80fb4672a5a31dad07125a29597ff8323e0 100644
|
| --- a/sdk/lib/io/file_impl.dart
|
| +++ b/sdk/lib/io/file_impl.dart
|
| @@ -58,7 +58,7 @@ class _FileStream extends Stream<List<int>> {
|
| _openedFile = null;
|
| return closeFuture;
|
| } else {
|
| - return new Future.immediate(null);
|
| + return new Future.value();
|
| }
|
| }
|
|
|
| @@ -106,7 +106,7 @@ class _FileStream extends Stream<List<int>> {
|
| if (_path != null) {
|
| openFuture = new File(_path).open(mode: FileMode.READ);
|
| } else {
|
| - openFuture = new Future.immediate(_File._openStdioSync(0));
|
| + openFuture = new Future.value(_File._openStdioSync(0));
|
| }
|
| openFuture
|
| .then((RandomAccessFile opened) {
|
| @@ -158,7 +158,7 @@ class _FileStreamConsumer extends StreamConsumer<List<int>> {
|
|
|
| _FileStreamConsumer.fromStdio(int fd) {
|
| assert(1 <= fd && fd <= 2);
|
| - _openFuture = new Future.immediate(_File._openStdioSync(fd));
|
| + _openFuture = new Future.value(_File._openStdioSync(fd));
|
| }
|
|
|
| Future<File> consume(Stream<List<int>> stream) {
|
| @@ -561,7 +561,7 @@ class _File extends _FileBase implements File {
|
| sink.close();
|
| return sink.done.then((_) => this);;
|
| } catch (e) {
|
| - return new Future.immediateError(e);
|
| + return new Future.error(e);
|
| }
|
| }
|
|
|
|
|