Skip to content

Commit

Permalink
Auto merge of #1204 - Kobata:rustfmt-pr, r=emilio
Browse files Browse the repository at this point in the history
Revert to only calling plain rustfmt

rust-lang/rustup#1294 added a proxy executable for rustfmt that will act on the correct bundled rustfmt for the default release channel set by rustup.

And, assuming I'm reading the expected release notes correctly, it seems like rust 1.23, due out fairly shortly, will add the bundled version of rustfmt to stable.

This fixes #1184
  • Loading branch information
bors-servo authored Jan 1, 2018
2 parents 04591f0 + 6e1e19e commit e8d5230
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1711,15 +1711,7 @@ impl Bindings {
let rustfmt = which::which("rustfmt")
.map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_owned()))?;

// Prefer using the `rustfmt-nightly` version of `rustmft`, if
// possible. It requires being run via `rustup run nightly ...`.
let mut cmd = if let Ok(rustup) = which::which("rustup") {
let mut cmd = Command::new(rustup);
cmd.args(&["run", "nightly", "rustfmt", "--"]);
cmd
} else {
Command::new(rustfmt)
};
let mut cmd = Command::new(rustfmt);

cmd
.stdin(Stdio::piped())
Expand Down

0 comments on commit e8d5230

Please sign in to comment.