Skip to content

Commit 1a36f97

Browse files
bruno-ortizVeykril
authored andcommitted
removing unused function
1 parent 27b4c15 commit 1a36f97

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

editors/code/src/toolchain.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -194,32 +194,6 @@ export async function activeToolchain(): Promise<string> {
194194
});
195195
}
196196

197-
export async function rustVersion(): Promise<string> {
198-
const pathToRustup = await rustupPath();
199-
return await new Promise((resolve, reject) => {
200-
const execution = cp.spawn(pathToRustup, ['show', 'active-toolchain'], {
201-
stdio: ['ignore', 'pipe', 'pipe'],
202-
cwd: os.homedir()
203-
});
204-
const rl = readline.createInterface({ input: execution.stdout });
205-
206-
let currToolchain: string | undefined = undefined;
207-
rl.on('line', line => {
208-
const match = line.match(TOOLCHAIN_PATTERN);
209-
if (match) {
210-
currToolchain = match[1];
211-
}
212-
});
213-
execution.on('exit', (exitCode, _) => {
214-
if (exitCode === 1 && currToolchain)
215-
resolve(currToolchain);
216-
else
217-
reject(new Error(`exit code: ${exitCode}.`));
218-
});
219-
220-
});
221-
}
222-
223197
/** Mirrors `project_model::sysroot::discover_sysroot_dir()` implementation*/
224198
export async function getSysroot(dir: string): Promise<string> {
225199
const rustcPath = await getPathForExecutable("rustc");

0 commit comments

Comments
 (0)