about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSanjaiyan Parthipan <parthipankalayini@gmail.com>2023-12-19 13:16:55 +0530
committerGitHub <noreply@github.com>2023-12-19 13:16:55 +0530
commitf587b543409142c1fa4bdcdfb29328b8958e72d0 (patch)
tree4d68ac4a7c7b841198ab7e5d1b1ea345938bfb17
parentdbd0b035e642ae55c35ad3fffa5507cf42fc8d8e (diff)
downloadrust-f587b543409142c1fa4bdcdfb29328b8958e72d0.tar.gz
rust-f587b543409142c1fa4bdcdfb29328b8958e72d0.zip
perf: Run async task in concurrent
-rw-r--r--editors/code/src/debug.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/editors/code/src/debug.ts b/editors/code/src/debug.ts
index 06034e16480..d9c6b6ac456 100644
--- a/editors/code/src/debug.ts
+++ b/editors/code/src/debug.ts
@@ -135,8 +135,10 @@ async function getDebugConfiguration(
     let sourceFileMap = debugOptions.sourceFileMap;
     if (sourceFileMap === "auto") {
         // let's try to use the default toolchain
-        const commitHash = await getRustcId(wsFolder);
-        const sysroot = await getSysroot(wsFolder);
+        const [commitHash, sysroot] = await Promise.all([
+            getRustcId(wsFolder),
+            getSysroot(wsFolder),
+        ]);
         const rustlib = path.normalize(sysroot + "/lib/rustlib/src/rust");
         sourceFileMap = {};
         sourceFileMap[`/rustc/${commitHash}/`] = rustlib;