Index: sdk/lib/io/io_sink.dart |
diff --git a/sdk/lib/io/io_sink.dart b/sdk/lib/io/io_sink.dart |
index 3a5ca681fa732c3e8cf551b31a3b65990f1feab8..bae95792db6edafc5d70b7833865b6a8a0eb612b 100644 |
--- a/sdk/lib/io/io_sink.dart |
+++ b/sdk/lib/io/io_sink.dart |
@@ -19,16 +19,14 @@ part of dart.io; |
* ignored. Use the [done] future to be notified when the [IOSink] is closed. |
*/ |
abstract class IOSink implements StreamSink<List<int>>, StringSink { |
- |
/** |
* Create an [IOSink] that outputs to a [target] [StreamConsumer] of bytes. |
* |
* Text written to [StreamSink] methods is encoded to bytes using [encoding] |
* before being output on [target]. |
*/ |
- factory IOSink(StreamConsumer<List<int>> target, |
- {Encoding encoding: UTF8}) |
- => new _IOSinkImpl(target, encoding); |
+ factory IOSink(StreamConsumer<List<int>> target, {Encoding encoding: UTF8}) => |
+ new _IOSinkImpl(target, encoding); |
/** |
* The [Encoding] used when writing strings. Depending on the |
@@ -166,11 +164,11 @@ class _StreamSinkImpl<T> implements StreamSink<T> { |
if (_hasError) return done; |
// Wait for any sync operations to complete. |
Future targetAddStream() { |
- return _target.addStream(stream) |
- .whenComplete(() { |
- _isBound = false; |
- }); |
+ return _target.addStream(stream).whenComplete(() { |
+ _isBound = false; |
+ }); |
} |
+ |
if (_controllerInstance == null) return targetAddStream(); |
var future = _controllerCompleter.future; |
_controllerInstance.close(); |
@@ -258,18 +256,16 @@ class _StreamSinkImpl<T> implements StreamSink<T> { |
_completeDoneError(error, stackTrace); |
} |
}); |
- } |
+ } |
return _controllerInstance; |
} |
} |
- |
class _IOSinkImpl extends _StreamSinkImpl<List<int>> implements IOSink { |
Encoding _encoding; |
bool _encodingMutable = true; |
- _IOSinkImpl(StreamConsumer<List<int>> target, this._encoding) |
- : super(target); |
+ _IOSinkImpl(StreamConsumer<List<int>> target, this._encoding) : super(target); |
Encoding get encoding => _encoding; |