diff options
| author | Sanjaiyan Parthipan <parthipankalayini@gmail.com> | 2023-12-19 13:16:55 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-19 13:16:55 +0530 |
| commit | f587b543409142c1fa4bdcdfb29328b8958e72d0 (patch) | |
| tree | 4d68ac4a7c7b841198ab7e5d1b1ea345938bfb17 | |
| parent | dbd0b035e642ae55c35ad3fffa5507cf42fc8d8e (diff) | |
| download | rust-f587b543409142c1fa4bdcdfb29328b8958e72d0.tar.gz rust-f587b543409142c1fa4bdcdfb29328b8958e72d0.zip | |
perf: Run async task in concurrent
| -rw-r--r-- | editors/code/src/debug.ts | 6 |
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; |
