perf: Run async task in concurrent

This commit is contained in:
Sanjaiyan Parthipan 2023-12-19 13:16:55 +05:30 committed by GitHub
parent dbd0b035e6
commit f587b54340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;