Cleanup for readability
diff --git a/bin/collect_coverage.dart b/bin/collect_coverage.dart
index 4d2506f..8e8de19 100644
--- a/bin/collect_coverage.dart
+++ b/bin/collect_coverage.dart
@@ -42,12 +42,12 @@
void main(List<String> arguments) {
var options = parseArgs(arguments);
connect(options.host, options.port).then((observatory) {
- getAllCoverage(observatory).then((coverage) {
- options.out.write(JSON.encode(coverage));
- return options.out.close();
- })
- .then((_) => options.unpin ? unpinIsolates(observatory) : null)
- .then((_) => observatory.close());
+ getAllCoverage(observatory)
+ .then(JSON.encode)
+ .then(options.out.write)
+ .then((_) => options.out.close())
+ .then((_) => options.unpin ? unpinIsolates(observatory) : null)
+ .then((_) => observatory.close());
});
}