mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
vscode: refactor inverted ternaries to if statements as per @matklad
This commit is contained in:
parent
34241b9af9
commit
7a09274e52
@ -97,7 +97,9 @@ export class Config {
|
|||||||
|
|
||||||
const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform);
|
const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform);
|
||||||
|
|
||||||
return !prebuiltBinaryName ? null : {
|
if (!prebuiltBinaryName) return null;
|
||||||
|
|
||||||
|
return {
|
||||||
type: BinarySource.Type.GithubRelease,
|
type: BinarySource.Type.GithubRelease,
|
||||||
dir: ctx.globalStoragePath,
|
dir: ctx.globalStoragePath,
|
||||||
file: prebuiltBinaryName,
|
file: prebuiltBinaryName,
|
||||||
|
@ -26,7 +26,9 @@ export async function fetchLatestArtifactMetadata(
|
|||||||
|
|
||||||
const artifact = response.assets.find(artifact => artifact.name === artifactFileName);
|
const artifact = response.assets.find(artifact => artifact.name === artifactFileName);
|
||||||
|
|
||||||
return !artifact ? null : {
|
if (!artifact) return null;
|
||||||
|
|
||||||
|
return {
|
||||||
releaseName: response.name,
|
releaseName: response.name,
|
||||||
downloadUrl: artifact.browser_download_url
|
downloadUrl: artifact.browser_download_url
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user