mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
refactor: Rename CargoTask to RustTask in extension
This commit is contained in:
parent
14558af15e
commit
d472fd932b
2 changed files with 13 additions and 13 deletions
|
@ -113,7 +113,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
|
||||
const args = createArgs(runnable);
|
||||
|
||||
const definition: tasks.CargoTaskDefinition = {
|
||||
const definition: tasks.RustTargetDefinition = {
|
||||
type: tasks.TASK_TYPE,
|
||||
command: args[0], // run, test, etc...
|
||||
args: args.slice(1),
|
||||
|
@ -124,7 +124,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
|
||||
const cargoTask = await tasks.buildCargoTask(
|
||||
const task = await tasks.buildRustTask(
|
||||
target,
|
||||
definition,
|
||||
runnable.label,
|
||||
|
@ -134,12 +134,12 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
true,
|
||||
);
|
||||
|
||||
cargoTask.presentationOptions.clear = true;
|
||||
task.presentationOptions.clear = true;
|
||||
// Sadly, this doesn't prevent focus stealing if the terminal is currently
|
||||
// hidden, and will become revealed due to task execution.
|
||||
cargoTask.presentationOptions.focus = false;
|
||||
task.presentationOptions.focus = false;
|
||||
|
||||
return cargoTask;
|
||||
return task;
|
||||
}
|
||||
|
||||
export function createArgs(runnable: ra.Runnable): string[] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue