Skip to content

Commit

Permalink
Revert to only calling plain rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobata committed Jan 1, 2018
1 parent 04591f0 commit 6e1e19e
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 6e1e19e

Please sign in to comment.