aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/expand_macro.ts
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-17 13:24:07 +0000
committerGitHub <[email protected]>2020-02-17 13:24:07 +0000
commit4fea5808e9209c385e915d9d060c18520ce081b3 (patch)
treeb1b3be960ba393200c6676fa096f8c1e12e64cc2 /editors/code/src/commands/expand_macro.ts
parent6167101302bcc2d7f1a345e0ee44e1411056b4b3 (diff)
parent3717b0e03f2336dcccea34c5a362b20966151b18 (diff)
Merge #3191
3191: Remove two stage constuction r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors/code/src/commands/expand_macro.ts')
-rw-r--r--editors/code/src/commands/expand_macro.ts4
1 files changed, 1 insertions, 3 deletions
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 {
42 42
43class TextDocumentContentProvider 43class TextDocumentContentProvider
44 implements vscode.TextDocumentContentProvider { 44 implements vscode.TextDocumentContentProvider {
45 private ctx: Ctx;
46 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs'); 45 uri = vscode.Uri.parse('rust-analyzer://expandMacro/[EXPANSION].rs');
47 eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 46 eventEmitter = new vscode.EventEmitter<vscode.Uri>();
48 47
49 constructor(ctx: Ctx) { 48 constructor(private readonly ctx: Ctx) {
50 this.ctx = ctx;
51 } 49 }
52 50
53 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> { 51 async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {