Only printing an empty line after the first target output is changed to
use the `enumerate` method on an Iterator with a non-zero index.
I could not get the `drop_println` macro to compile. Something about the
`shell` missing. The standard library `println` macro seems work fine.
if kinds.is_empty() {
kinds.push(CompileKind::Host);
}
- let mut print_empty_line = false;
- for kind in kinds {
+ for (index, kind) in kinds.iter().enumerate() {
+ if index != 0 {
+ println!();
+ }
let rustflags = env_args(
config,
&build_config.requested_kinds,
&rustc.host,
None,
- kind,
+ *kind,
"RUSTFLAGS",
)?;
let mut process = rustc.process();
let output = process.exec_with_output()?;
let stdout = std::io::stdout();
let mut lock = stdout.lock();
- if print_empty_line {
- writeln!(lock)?;
- } else {
- print_empty_line = true;
- }
lock.write_all(&output.stdout)?;
drop(lock);
}