Rename RustTargetDefinition to CargoTaskDefinition

This commit is contained in:
Wilfred Hughes 2024-03-28 15:18:39 -07:00
parent f5a9250147
commit e8d6a5ec0b
2 changed files with 4 additions and 4 deletions

View file

@ -124,7 +124,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
program = await toolchain.cargoPath();
}
const definition: tasks.RustTargetDefinition = {
const definition: tasks.CargoTaskDefinition = {
type: tasks.TASK_TYPE,
program,
args,

View file

@ -8,7 +8,7 @@ import { log } from "./util";
export const TASK_TYPE = "cargo";
export const TASK_SOURCE = "rust";
export interface RustTargetDefinition extends vscode.TaskDefinition {
export interface CargoTaskDefinition extends vscode.TaskDefinition {
program: string;
args: string[];
cwd?: string;
@ -62,7 +62,7 @@ class RustTaskProvider implements vscode.TaskProvider {
// we need to inform VSCode how to execute that command by creating
// a ShellExecution for it.
const definition = task.definition as RustTargetDefinition;
const definition = task.definition as CargoTaskDefinition;
if (definition.type === TASK_TYPE) {
return await buildRustTask(
@ -80,7 +80,7 @@ class RustTaskProvider implements vscode.TaskProvider {
export async function buildRustTask(
scope: vscode.WorkspaceFolder | vscode.TaskScope | undefined,
definition: RustTargetDefinition,
definition: CargoTaskDefinition,
name: string,
problemMatcher: string[],
customRunner?: string,