diff options
author | vsrs <[email protected]> | 2020-05-08 17:34:34 +0100 |
---|---|---|
committer | vsrs <[email protected]> | 2020-05-08 17:34:34 +0100 |
commit | 0ef17ef1ee9fb0ce7149176d12f4d225f6d01401 (patch) | |
tree | fa2f168120f36f8dbef5dc1e85fea0c0071639c2 /crates/ra_flycheck/src | |
parent | 1be6320ea6cf7830195f80681fa0f43cc340da7e (diff) | |
parent | d3eb9d8eafbebca7da95fa8a4813b92eb5080500 (diff) |
Merge remote-tracking branch 'upstream/master' into uniformed_debug_lens
# Conflicts:
# editors/code/src/commands/runnables.ts
Diffstat (limited to 'crates/ra_flycheck/src')
-rw-r--r-- | crates/ra_flycheck/src/lib.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs index f27252949..68dcee285 100644 --- a/crates/ra_flycheck/src/lib.rs +++ b/crates/ra_flycheck/src/lib.rs | |||
@@ -4,7 +4,6 @@ | |||
4 | mod conv; | 4 | mod conv; |
5 | 5 | ||
6 | use std::{ | 6 | use std::{ |
7 | env, | ||
8 | io::{self, BufRead, BufReader}, | 7 | io::{self, BufRead, BufReader}, |
9 | path::PathBuf, | 8 | path::PathBuf, |
10 | process::{Command, Stdio}, | 9 | process::{Command, Stdio}, |
@@ -216,10 +215,10 @@ impl FlycheckThread { | |||
216 | 215 | ||
217 | let mut cmd = match &self.config { | 216 | let mut cmd = match &self.config { |
218 | FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => { | 217 | FlycheckConfig::CargoCommand { command, all_targets, all_features, extra_args } => { |
219 | let mut cmd = Command::new(cargo_binary()); | 218 | let mut cmd = Command::new(ra_toolchain::cargo()); |
220 | cmd.arg(command); | 219 | cmd.arg(command); |
221 | cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]); | 220 | cmd.args(&["--workspace", "--message-format=json", "--manifest-path"]) |
222 | cmd.arg(self.workspace_root.join("Cargo.toml")); | 221 | .arg(self.workspace_root.join("Cargo.toml")); |
223 | if *all_targets { | 222 | if *all_targets { |
224 | cmd.arg("--all-targets"); | 223 | cmd.arg("--all-targets"); |
225 | } | 224 | } |
@@ -337,7 +336,3 @@ fn run_cargo( | |||
337 | 336 | ||
338 | Ok(()) | 337 | Ok(()) |
339 | } | 338 | } |
340 | |||
341 | fn cargo_binary() -> String { | ||
342 | env::var("CARGO").unwrap_or_else(|_| "cargo".to_string()) | ||
343 | } | ||