3024: vscode: eliminate floating promises and insane amount of resource handle leaks r=matklad a=Veetaha

Khm, yeah ...

Co-authored-by: Veetaha <gerzoh1@gmail.com>
This commit is contained in:
bors[bot] 2020-02-05 20:57:08 +00:00 committed by GitHub
commit ea9d18ba83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 19 deletions

View file

@ -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);
};
}

View file

@ -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,
);