Skip to content

Commit 5a096da

Browse files
committed
Fix windows.
1 parent 62711bd commit 5a096da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cargo/core/shell.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ impl Shell {
308308
}
309309
#[cfg(windows)]
310310
{
311-
if let ShellOut::Stream { stream, .. } = &mut self.err {
312-
::fwdansi::write_ansi(stream, message)?;
311+
if let ShellOut::Stream { stderr, .. } = &mut self.output {
312+
::fwdansi::write_ansi(stderr, message)?;
313313
return Ok(());
314314
}
315315
}
@@ -495,6 +495,6 @@ mod imp {
495495
fn default_err_erase_line(shell: &mut Shell) {
496496
if let Some(max_width) = imp::stderr_width() {
497497
let blank = " ".repeat(max_width);
498-
drop(write!(shell.err.as_write(), "{}\r", blank));
498+
drop(write!(shell.output.stderr(), "{}\r", blank));
499499
}
500500
}

src/cargo/ops/fix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
use std::collections::{BTreeSet, HashMap, HashSet};
4242
use std::env;
4343
use std::ffi::OsString;
44-
use std::io::Write;
4544
use std::path::{Path, PathBuf};
4645
use std::process::{self, Command, ExitStatus};
4746
use std::str;
@@ -525,6 +524,7 @@ fn rustfix_and_fix(
525524
fn exit_with(status: ExitStatus) -> ! {
526525
#[cfg(unix)]
527526
{
527+
use std::io::Write;
528528
use std::os::unix::prelude::*;
529529
if let Some(signal) = status.signal() {
530530
drop(writeln!(

0 commit comments

Comments
 (0)