diff --git a/editors/code/src/commands/ssr.ts b/editors/code/src/commands/ssr.ts index 9b814612aa..63c36ce806 100644 --- a/editors/code/src/commands/ssr.ts +++ b/editors/code/src/commands/ssr.ts @@ -1,6 +1,8 @@ -import { Ctx, Cmd } from '../ctx'; -import { applySourceChange, SourceChange } from '../source_change'; import * as vscode from 'vscode'; +import * as ra from "../rust-analyzer-api"; + +import { Ctx, Cmd } from '../ctx'; +import { applySourceChange } from '../source_change'; export function ssr(ctx: Ctx): Cmd { return async () => { @@ -21,16 +23,8 @@ export function ssr(ctx: Ctx): Cmd { if (!request) return; - const ssrRequest: SsrRequest = { arg: request }; - const change = await client.sendRequest( - 'rust-analyzer/ssr', - ssrRequest, - ); + const change = await client.sendRequest(ra.ssr, { arg: request },); await applySourceChange(ctx, change); }; } - -interface SsrRequest { - arg: string; -}