use yield* (#48307)

This commit is contained in:
Alexandre Ardhuin 2020-01-08 07:34:36 +01:00 committed by GitHub
parent 317b9e786b
commit 1c79347ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,7 @@ Stream<String> runAndGetStdout(String executable, List<String> arguments, {
stderr.addStream(process.stderr);
final Stream<String> lines = process.stdout.transform(utf8.decoder).transform(const LineSplitter());
await for (final String line in lines)
yield line;
yield* lines;
final int exitCode = await process.exitCode;
if ((exitCode == 0) == expectNonZeroExit || (expectedExitCode != null && exitCode != expectedExitCode)) {