From 8e4039c7d79cd846ddcabd6ce35eaa24813df011 Mon Sep 17 00:00:00 2001 From: "Alex.F" Date: Tue, 17 Aug 2021 15:24:13 +0800 Subject: [PATCH] inline await statement --- editors/code/src/toolchain.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editors/code/src/toolchain.ts b/editors/code/src/toolchain.ts index 30e79767dc709..52ad3e5d21d7c 100644 --- a/editors/code/src/toolchain.ts +++ b/editors/code/src/toolchain.ts @@ -160,8 +160,7 @@ export const getPathForExecutable = memoizeAsync( // it is not mentioned in docs and cannot be infered by the type signature... const standardPath = vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".cargo", "bin", executableName); - const exist = await isFileAtUri(standardPath); - if (exist) return standardPath.fsPath; + if (await isFileAtUri(standardPath)) return standardPath.fsPath; } catch (err) { log.error("Failed to read the fs info", err); }