diff options
| author | Veetaha <gerzoh1@gmail.com> | 2020-02-05 22:39:47 +0200 |
|---|---|---|
| committer | Veetaha <gerzoh1@gmail.com> | 2020-02-05 22:39:47 +0200 |
| commit | 8153b60e1d8abdcefbf6c7c9657f1ce65a216d7a (patch) | |
| tree | 68f445e973268dffce86c66cfc396c9221bf4ca3 /editors/code/src/commands | |
| parent | 8d0f7da2f5f2ae1dc5711005f08fde0007da165b (diff) | |
| download | rust-8153b60e1d8abdcefbf6c7c9657f1ce65a216d7a.tar.gz rust-8153b60e1d8abdcefbf6c7c9657f1ce65a216d7a.zip | |
vscode: eliminate floating promises and insane amount of resource handle leaks
Diffstat (limited to 'editors/code/src/commands')
| -rw-r--r-- | editors/code/src/commands/index.ts | 2 | ||||
| -rw-r--r-- | editors/code/src/commands/syntax_tree.ts | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index 5a4c1df5e03..aee96943201 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts @@ -35,7 +35,7 @@ export function showReferences(ctx: Ctx): Cmd { export function applySourceChange(ctx: Ctx): Cmd { return async (change: sourceChange.SourceChange) => { - sourceChange.applySourceChange(ctx, change); + await sourceChange.applySourceChange(ctx, change); }; } diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index 211f2251f25..7dde66ad1a1 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts @@ -22,6 +22,7 @@ export function syntaxTree(ctx: Ctx): Cmd { if (doc.languageId !== 'rust') return; afterLs(() => tdcp.eventEmitter.fire(tdcp.uri)); }, + null, ctx.subscriptions, ); @@ -30,6 +31,7 @@ export function syntaxTree(ctx: Ctx): Cmd { if (!editor || editor.document.languageId !== 'rust') return; tdcp.eventEmitter.fire(tdcp.uri); }, + null, ctx.subscriptions, ); |
