File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed
editors/code/src/commands Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,10 @@ export function analyzerStatus(ctx: Ctx): Cmd {
37
37
38
38
class TextDocumentContentProvider
39
39
implements vscode . TextDocumentContentProvider {
40
- private ctx : Ctx ;
41
40
uri = vscode . Uri . parse ( 'rust-analyzer-status://status' ) ;
42
41
eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
43
42
44
- constructor ( ctx : Ctx ) {
45
- this . ctx = ctx ;
43
+ constructor ( private readonly ctx : Ctx ) {
46
44
}
47
45
48
46
provideTextDocumentContent (
Original file line number Diff line number Diff line change @@ -42,12 +42,10 @@ function code_format(expanded: ExpandedMacro): string {
42
42
43
43
class TextDocumentContentProvider
44
44
implements vscode . TextDocumentContentProvider {
45
- private ctx : Ctx ;
46
45
uri = vscode . Uri . parse ( 'rust-analyzer://expandMacro/[EXPANSION].rs' ) ;
47
46
eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
48
47
49
- constructor ( ctx : Ctx ) {
50
- this . ctx = ctx ;
48
+ constructor ( private readonly ctx : Ctx ) {
51
49
}
52
50
53
51
async provideTextDocumentContent ( _uri : vscode . Uri ) : Promise < string > {
Original file line number Diff line number Diff line change @@ -68,12 +68,10 @@ interface SyntaxTreeParams {
68
68
69
69
class TextDocumentContentProvider
70
70
implements vscode . TextDocumentContentProvider {
71
- private ctx : Ctx ;
72
71
uri = vscode . Uri . parse ( 'rust-analyzer://syntaxtree' ) ;
73
72
eventEmitter = new vscode . EventEmitter < vscode . Uri > ( ) ;
74
73
75
- constructor ( ctx : Ctx ) {
76
- this . ctx = ctx ;
74
+ constructor ( private readonly ctx : Ctx ) {
77
75
}
78
76
79
77
provideTextDocumentContent ( uri : vscode . Uri ) : vscode . ProviderResult < string > {
You can’t perform that action at this time.
0 commit comments