diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-05 20:57:08 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-05 20:57:08 +0000 |
commit | ea9d18ba836a7228f7310e1bc77c0918f0191a42 (patch) | |
tree | 64b3cabe122d06484a521ff2428f2ca1e4df1d48 /editors/code/src/status_display.ts | |
parent | 2471b6bc3a318d7303d0556c85940090b6cf6d7a (diff) | |
parent | 8153b60e1d8abdcefbf6c7c9657f1ce65a216d7a (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.ts | 10 |
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 = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', ' | |||
9 | export function activateStatusDisplay(ctx: Ctx) { | 9 | export 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 | ||
17 | class StatusDisplay implements vscode.Disposable, Disposable { | 19 | class StatusDisplay implements Disposable { |
18 | packageName?: string; | 20 | packageName?: string; |
19 | 21 | ||
20 | private i: number = 0; | 22 | private i: number = 0; |