Skip to content

Commit d1721b1

Browse files
committed
removing unused function
1 parent ee54c65 commit d1721b1

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
@@ -192,32 +192,6 @@ export async function activeToolchain(): Promise<string> {
192192
});
193193
}
194194

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

0 commit comments

Comments
 (0)