Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: sdk/lib/io/io_sink.dart

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/io_resource_info.dart ('k') | sdk/lib/io/link.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « sdk/lib/io/io_resource_info.dart ('k') | sdk/lib/io/link.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698