Skip to content

Commit 364308d

Browse files
committed
removing unused function
1 parent 77a4bfd commit 364308d

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
@@ -199,32 +199,6 @@ export async function activeToolchain(): Promise<string> {
199199
});
200200
}
201201

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

0 commit comments

Comments
 (0)