From 3717b0e03f2336dcccea34c5a362b20966151b18 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Feb 2020 14:23:23 +0100 Subject: Simplify some more ctors --- editors/code/src/commands/expand_macro.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'editors/code/src/commands/expand_macro.ts') diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts index dcdde78af..6fee6eb41 100644 --- a/editors/code/src/commands/expand_macro.ts +++ b/editors/code/src/commands/expand_macro.ts @@ -42,12 +42,10 @@ function code_format(expanded: ExpandedMacro): string { class TextDocumentContentProvider implements vscode.TextDocumentContentProvider { - private ctx: Ctx; uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs'); eventEmitter = new vscode.EventEmitter(); - constructor(ctx: Ctx) { - this.ctx = ctx; + constructor(private readonly ctx: Ctx) { } async provideTextDocumentContent(_uri: vscode.Uri): Promise { -- cgit v1.2.3