mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Removed unnecessary extraArgs for cargo invocation
This commit is contained in:
parent
10836543d6
commit
11e9e4b1fb
2 changed files with 3 additions and 6 deletions
|
@ -55,12 +55,9 @@ export class Cargo {
|
|||
return artifacts;
|
||||
}
|
||||
|
||||
public async executableFromArgs(cargoArgs: string[], extraArgs?: string[]): Promise<string> {
|
||||
public async executableFromArgs(args: string[]): Promise<string> {
|
||||
let cargoArgs = [...args]; // to remain args unchanged
|
||||
cargoArgs.push("--message-format=json");
|
||||
if (extraArgs) {
|
||||
cargoArgs.push('--');
|
||||
cargoArgs.push(...extraArgs);
|
||||
}
|
||||
|
||||
const artifacts = await this.artifactsFromArgs(cargoArgs);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ async function getCppvsDebugConfig(config: ra.Runnable, sourceFileMap: Record<st
|
|||
debugOutput.clear();
|
||||
|
||||
const cargo = new Cargo(config.cwd || '.', debugOutput);
|
||||
const executable = await cargo.executableFromArgs(config.args, config.extraArgs);
|
||||
const executable = await cargo.executableFromArgs(config.args);
|
||||
|
||||
// if we are here, there were no compilation errors.
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue