diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/src/cargo.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editors/code/src/cargo.ts b/editors/code/src/cargo.ts index 28c7de992..6a41873d0 100644 --- a/editors/code/src/cargo.ts +++ b/editors/code/src/cargo.ts | |||
@@ -51,10 +51,14 @@ export class Cargo { | |||
51 | 51 | ||
52 | // arguments for a runnable from the quick pick should be updated. | 52 | // arguments for a runnable from the quick pick should be updated. |
53 | // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens | 53 | // see crates\rust-analyzer\src\main_loop\handlers.rs, handle_code_lens |
54 | if (cargoArgs[0] === "run") { | 54 | switch (cargoArgs[0]) { |
55 | cargoArgs[0] = "build"; | 55 | case "run": cargoArgs[0] = "build"; break; |
56 | } else if (cargoArgs.indexOf("--no-run") === -1) { | 56 | case "test": { |
57 | cargoArgs.push("--no-run"); | 57 | if (cargoArgs.indexOf("--no-run") === -1) { |
58 | cargoArgs.push("--no-run"); | ||
59 | } | ||
60 | break; | ||
61 | } | ||
58 | } | 62 | } |
59 | 63 | ||
60 | let artifacts = await this.artifactsFromArgs(cargoArgs); | 64 | let artifacts = await this.artifactsFromArgs(cargoArgs); |