Skip to content

Commit df4d595

Browse files
committed
Remane function
1 parent d38f759 commit df4d595

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

editors/code/src/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
177177
if (!shouldCheckForNewNightly) return;
178178
}
179179

180-
const release = await performDownloadWithRetryDialog(state, async () => {
180+
const release = await downloadWithRetryDialog(state, async () => {
181181
return await fetchRelease("nightly", state.githubToken);
182182
}).catch((e) => {
183183
log.error(e);
@@ -199,7 +199,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi
199199

200200
const dest = path.join(config.globalStoragePath, "rust-analyzer.vsix");
201201

202-
await performDownloadWithRetryDialog(state, async () => {
202+
await downloadWithRetryDialog(state, async () => {
203203
// Unlinking the exe file before moving new one on its place should prevent ETXTBSY error.
204204
await fs.unlink(dest).catch(err => {
205205
if (err.code !== "ENOENT") throw err;
@@ -323,13 +323,13 @@ async function getServer(config: Config, state: PersistentState): Promise<string
323323
}
324324

325325
const releaseTag = config.package.releaseTag;
326-
const release = await performDownloadWithRetryDialog(state, async () => {
326+
const release = await downloadWithRetryDialog(state, async () => {
327327
return await fetchRelease(releaseTag, state.githubToken);
328328
});
329329
const artifact = release.assets.find(artifact => artifact.name === `rust-analyzer-${platform}.gz`);
330330
assert(!!artifact, `Bad release: ${JSON.stringify(release)}`);
331331

332-
await performDownloadWithRetryDialog(state, async () => {
332+
await downloadWithRetryDialog(state, async () => {
333333
// Unlinking the exe file before moving new one on its place should prevent ETXTBSY error.
334334
await fs.unlink(dest).catch(err => {
335335
if (err.code !== "ENOENT") throw err;
@@ -353,7 +353,7 @@ async function getServer(config: Config, state: PersistentState): Promise<string
353353
return dest;
354354
}
355355

356-
async function performDownloadWithRetryDialog<T>(state: PersistentState, downloadFunc: () => Promise<T>): Promise<T> {
356+
async function downloadWithRetryDialog<T>(state: PersistentState, downloadFunc: () => Promise<T>): Promise<T> {
357357
while (true) {
358358
try {
359359
return await downloadFunc();

0 commit comments

Comments
 (0)