about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbruno-ortiz <brunortiz11@gmail.com>2022-02-26 11:17:10 -0300
committerBruno Ortiz <brunortiz11@gmail.com>2023-05-02 10:48:38 -0300
commit364308d1dc653199dd786486f4eed0d456a95330 (patch)
tree90b30f6bb74178a41a970028abbf0fb6f085b171
parent77a4bfd34f2d251482aca8e8da10634f34552e3b (diff)
downloadrust-364308d1dc653199dd786486f4eed0d456a95330.tar.gz
rust-364308d1dc653199dd786486f4eed0d456a95330.zip
removing unused function
-rw-r--r--editors/code/src/toolchain.ts26
1 files changed, 0 insertions, 26 deletions
diff --git a/editors/code/src/toolchain.ts b/editors/code/src/toolchain.ts
index 6f37451edd2..75e0ed1d125 100644
--- a/editors/code/src/toolchain.ts
+++ b/editors/code/src/toolchain.ts
@@ -199,32 +199,6 @@ export async function activeToolchain(): Promise<string> {
     });
 }
 
-export async function rustVersion(): Promise<string> {
-    const pathToRustup = await rustupPath();
-    return await new Promise((resolve, reject) => {
-        const execution = cp.spawn(pathToRustup, ['show', 'active-toolchain'], {
-            stdio: ['ignore', 'pipe', 'pipe'],
-            cwd: os.homedir()
-        });
-        const rl = readline.createInterface({ input: execution.stdout });
-
-        let currToolchain: string | undefined = undefined;
-        rl.on('line', line => {
-            const match = line.match(TOOLCHAIN_PATTERN);
-            if (match) {
-                currToolchain = match[1];
-            }
-        });
-        execution.on('exit', (exitCode, _) => {
-            if (exitCode === 1 && currToolchain)
-                resolve(currToolchain);
-            else
-                reject(new Error(`exit code: ${exitCode}.`));
-        });
-
-    });
-}
-
 /** Mirrors `project_model::sysroot::discover_sysroot_dir()` implementation*/
 export async function getSysroot(dir: string): Promise<string> {
     const rustcPath = await getPathForExecutable("rustc");