Skip to content

Commit

Permalink
perf: Run async task in concurrent
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaiyan-dev authored Dec 19, 2023
1 parent dbd0b03 commit f587b54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editors/code/src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f587b54

Please sign in to comment.