We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0bcaea + d264d7b commit 5d080ddCopy full SHA for 5d080dd
editors/code/src/cargo.ts
@@ -51,10 +51,14 @@ export class Cargo {
51
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
54
- if (cargoArgs[0] === "run") {
55
- cargoArgs[0] = "build";
56
- } else if (cargoArgs.indexOf("--no-run") === -1) {
57
- cargoArgs.push("--no-run");
+ switch (cargoArgs[0]) {
+ case "run": cargoArgs[0] = "build"; break;
+ case "test": {
+ if (cargoArgs.indexOf("--no-run") === -1) {
58
+ cargoArgs.push("--no-run");
59
+ }
60
+ break;
61
62
}
63
64
let artifacts = await this.artifactsFromArgs(cargoArgs);
0 commit comments