Skip to content

Commit 01b0fd8

Browse files
committed
removing unused function
1 parent 0273f9e commit 01b0fd8

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

editors/code/src/toolchain.ts

-26
Original file line numberDiff line numberDiff line change
@@ -193,32 +193,6 @@ export async function activeToolchain(): Promise<string> {
193193
});
194194
}
195195

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

0 commit comments

Comments
 (0)