diff options
| author | Alex.F <gfreezy@gmail.com> | 2021-08-17 15:24:13 +0800 |
|---|---|---|
| committer | Alex.F <gfreezy@gmail.com> | 2021-08-17 15:24:13 +0800 |
| commit | 8e4039c7d79cd846ddcabd6ce35eaa24813df011 (patch) | |
| tree | 80ccfbede927d31af16284856d5315d5123c69c5 /editors/code | |
| parent | 635b89fdaa687685bb482270570a48c3c0c5f84b (diff) | |
| download | rust-8e4039c7d79cd846ddcabd6ce35eaa24813df011.tar.gz rust-8e4039c7d79cd846ddcabd6ce35eaa24813df011.zip | |
inline await statement
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/src/toolchain.ts | 3 |
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); } |
