Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/toolchain.ts')
| -rw-r--r-- | editors/code/src/toolchain.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/code/src/toolchain.ts b/editors/code/src/toolchain.ts index a859ce6ff0..f64dec2ccf 100644 --- a/editors/code/src/toolchain.ts +++ b/editors/code/src/toolchain.ts @@ -3,7 +3,7 @@ import * as os from "os"; import * as path from "path"; import * as readline from "readline"; import * as vscode from "vscode"; -import { log, memoizeAsync, unwrapUndefinable } from "./util"; +import { Env, log, memoizeAsync, unwrapUndefinable } from "./util"; import type { CargoRunnableArgs } from "./lsp_ext"; interface CompilationArtifact { @@ -37,8 +37,8 @@ interface CompilerMessage { export class Cargo { constructor( readonly rootFolder: string, - readonly env: Record<string, string>, - ) {} + readonly env: Env, + ) { } // Made public for testing purposes static artifactSpec(cargoArgs: string[], executableArgs?: string[]): ArtifactSpec { @@ -156,7 +156,7 @@ export class Cargo { /** Mirrors `toolchain::cargo()` implementation */ // FIXME: The server should provide this -export function cargoPath(env?: Record<string, string>): Promise<string> { +export function cargoPath(env?: Env): Promise<string> { if (env?.["RUSTC_TOOLCHAIN"]) { return Promise.resolve("cargo"); } |