mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Rename RustTargetDefinition to CargoTaskDefinition
This commit is contained in:
parent
f5a9250147
commit
e8d6a5ec0b
2 changed files with 4 additions and 4 deletions
|
@ -124,7 +124,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
||||||
program = await toolchain.cargoPath();
|
program = await toolchain.cargoPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
const definition: tasks.RustTargetDefinition = {
|
const definition: tasks.CargoTaskDefinition = {
|
||||||
type: tasks.TASK_TYPE,
|
type: tasks.TASK_TYPE,
|
||||||
program,
|
program,
|
||||||
args,
|
args,
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { log } from "./util";
|
||||||
export const TASK_TYPE = "cargo";
|
export const TASK_TYPE = "cargo";
|
||||||
export const TASK_SOURCE = "rust";
|
export const TASK_SOURCE = "rust";
|
||||||
|
|
||||||
export interface RustTargetDefinition extends vscode.TaskDefinition {
|
export interface CargoTaskDefinition extends vscode.TaskDefinition {
|
||||||
program: string;
|
program: string;
|
||||||
args: string[];
|
args: string[];
|
||||||
cwd?: string;
|
cwd?: string;
|
||||||
|
@ -62,7 +62,7 @@ class RustTaskProvider implements vscode.TaskProvider {
|
||||||
// we need to inform VSCode how to execute that command by creating
|
// we need to inform VSCode how to execute that command by creating
|
||||||
// a ShellExecution for it.
|
// a ShellExecution for it.
|
||||||
|
|
||||||
const definition = task.definition as RustTargetDefinition;
|
const definition = task.definition as CargoTaskDefinition;
|
||||||
|
|
||||||
if (definition.type === TASK_TYPE) {
|
if (definition.type === TASK_TYPE) {
|
||||||
return await buildRustTask(
|
return await buildRustTask(
|
||||||
|
@ -80,7 +80,7 @@ class RustTaskProvider implements vscode.TaskProvider {
|
||||||
|
|
||||||
export async function buildRustTask(
|
export async function buildRustTask(
|
||||||
scope: vscode.WorkspaceFolder | vscode.TaskScope | undefined,
|
scope: vscode.WorkspaceFolder | vscode.TaskScope | undefined,
|
||||||
definition: RustTargetDefinition,
|
definition: CargoTaskDefinition,
|
||||||
name: string,
|
name: string,
|
||||||
problemMatcher: string[],
|
problemMatcher: string[],
|
||||||
customRunner?: string,
|
customRunner?: string,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue