about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorAlex.F <gfreezy@gmail.com>2021-08-17 15:24:13 +0800
committerAlex.F <gfreezy@gmail.com>2021-08-17 15:24:13 +0800
commit8e4039c7d79cd846ddcabd6ce35eaa24813df011 (patch)
tree80ccfbede927d31af16284856d5315d5123c69c5 /editors/code
parent635b89fdaa687685bb482270570a48c3c0c5f84b (diff)
downloadrust-8e4039c7d79cd846ddcabd6ce35eaa24813df011.tar.gz
rust-8e4039c7d79cd846ddcabd6ce35eaa24813df011.zip
inline await statement
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/toolchain.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/code/src/toolchain.ts b/editors/code/src/toolchain.ts
index 30e79767dc7..52ad3e5d21d 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);
         }