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/syntax_tree.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'editors/code/src/commands/syntax_tree.ts') diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index 7dde66ad1..2887c96c8 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts @@ -68,12 +68,10 @@ interface SyntaxTreeParams { class TextDocumentContentProvider implements vscode.TextDocumentContentProvider { - private ctx: Ctx; uri = vscode.Uri.parse('rust-analyzer://syntaxtree'); eventEmitter = new vscode.EventEmitter(); - constructor(ctx: Ctx) { - this.ctx = ctx; + constructor(private readonly ctx: Ctx) { } provideTextDocumentContent(uri: vscode.Uri): vscode.ProviderResult { -- cgit v1.2.3