aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/status_display.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-05 20:57:08 +0000
committerGitHub <[email protected]>2020-02-05 20:57:08 +0000
commitea9d18ba836a7228f7310e1bc77c0918f0191a42 (patch)
tree64b3cabe122d06484a521ff2428f2ca1e4df1d48 /editors/code/src/status_display.ts
parent2471b6bc3a318d7303d0556c85940090b6cf6d7a (diff)
parent8153b60e1d8abdcefbf6c7c9657f1ce65a216d7a (diff)
Merge #3024
3024: vscode: eliminate floating promises and insane amount of resource handle leaks r=matklad a=Veetaha Khm, yeah ... Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code/src/status_display.ts')
-rw-r--r--editors/code/src/status_display.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts
index 4317410c7..51dbf388b 100644
--- a/editors/code/src/status_display.ts
+++ b/editors/code/src/status_display.ts
@@ -9,12 +9,14 @@ const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '
9export function activateStatusDisplay(ctx: Ctx) { 9export function activateStatusDisplay(ctx: Ctx) {
10 const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command); 10 const statusDisplay = new StatusDisplay(ctx.config.cargoWatchOptions.command);
11 ctx.pushCleanup(statusDisplay); 11 ctx.pushCleanup(statusDisplay);
12 ctx.onDidRestart(client => { 12 ctx.onDidRestart(client => ctx.pushCleanup(client.onProgress(
13 client.onProgress(WorkDoneProgress.type, 'rustAnalyzer/cargoWatcher', params => statusDisplay.handleProgressNotification(params)); 13 WorkDoneProgress.type,
14 }); 14 'rustAnalyzer/cargoWatcher',
15 params => statusDisplay.handleProgressNotification(params)
16 )));
15} 17}
16 18
17class StatusDisplay implements vscode.Disposable, Disposable { 19class StatusDisplay implements Disposable {
18 packageName?: string; 20 packageName?: string;
19 21
20 private i: number = 0; 22 private i: number = 0;