mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Fix code after "apply suggestions"
This commit is contained in:
parent
c40ee089f2
commit
28e9e8d4cf
4 changed files with 21 additions and 15 deletions
|
@ -43,7 +43,9 @@ export class CargoWatchProvider implements vscode.Disposable {
|
|||
this.diagnosticCollection = vscode.languages.createDiagnosticCollection(
|
||||
'rustc'
|
||||
);
|
||||
this.statusDisplay = new StatusDisplay(Server.config.cargoWatchOptions.checkCommand);
|
||||
this.statusDisplay = new StatusDisplay(
|
||||
Server.config.cargoWatchOptions.command
|
||||
);
|
||||
this.outputChannel = vscode.window.createOutputChannel(
|
||||
'Cargo Watch Trace'
|
||||
);
|
||||
|
@ -57,10 +59,12 @@ export class CargoWatchProvider implements vscode.Disposable {
|
|||
return;
|
||||
}
|
||||
|
||||
let args = Server.config.cargoWatchOptions.checkCommand + ' --all-targets --message-format json';
|
||||
if (Server.config.cargoWatchOptions.checkArguments.length > 0) {
|
||||
let args =
|
||||
Server.config.cargoWatchOptions.command +
|
||||
' --all-targets --message-format json';
|
||||
if (Server.config.cargoWatchOptions.command.length > 0) {
|
||||
// Excape the double quote string:
|
||||
args += ' ' + Server.config.cargoWatchOptions.checkArguments;
|
||||
args += ' ' + Server.config.cargoWatchOptions.arguments;
|
||||
}
|
||||
// Windows handles arguments differently than the unix-likes, so we need to wrap the args in double quotes
|
||||
if (process.platform === 'win32') {
|
||||
|
|
|
@ -30,7 +30,9 @@ export class StatusDisplay implements vscode.Disposable {
|
|||
this.packageName
|
||||
}] ${this.frame()}`;
|
||||
} else {
|
||||
this.statusBarItem!.text = `cargo ${this.command} ${this.frame()}`;
|
||||
this.statusBarItem!.text = `cargo ${
|
||||
this.command
|
||||
} ${this.frame()}`;
|
||||
}
|
||||
}, 300);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue