mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Simplify some more ctors
This commit is contained in:
parent
3c12cd49ec
commit
3717b0e03f
@ -37,12 +37,10 @@ export function analyzerStatus(ctx: Ctx): Cmd {
|
||||
|
||||
class TextDocumentContentProvider
|
||||
implements vscode.TextDocumentContentProvider {
|
||||
private ctx: Ctx;
|
||||
uri = vscode.Uri.parse('rust-analyzer-status://status');
|
||||
eventEmitter = new vscode.EventEmitter<vscode.Uri>();
|
||||
|
||||
constructor(ctx: Ctx) {
|
||||
this.ctx = ctx;
|
||||
constructor(private readonly ctx: Ctx) {
|
||||
}
|
||||
|
||||
provideTextDocumentContent(
|
||||
|
@ -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<vscode.Uri>();
|
||||
|
||||
constructor(ctx: Ctx) {
|
||||
this.ctx = ctx;
|
||||
constructor(private readonly ctx: Ctx) {
|
||||
}
|
||||
|
||||
async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
|
||||
|
@ -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<vscode.Uri>();
|
||||
|
||||
constructor(ctx: Ctx) {
|
||||
this.ctx = ctx;
|
||||
constructor(private readonly ctx: Ctx) {
|
||||
}
|
||||
|
||||
provideTextDocumentContent(uri: vscode.Uri): vscode.ProviderResult<string> {
|
||||
|
Loading…
Reference in New Issue
Block a user