mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
vscode: eliminate floating promises and insane amount of resource handle leaks
This commit is contained in:
parent
8d0f7da2f5
commit
8153b60e1d
8 changed files with 34 additions and 19 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue