]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/src/client.ts
handle promise catches
[rust.git] / editors / code / src / client.ts
index 539e487ec966f03ea4cb6b03e9f51773e7f589e3..6f2d48d1d5640ee35bdb314441871ceb0c0fbd1b 100644 (file)
@@ -11,7 +11,7 @@ export interface Env {
 }
 
 function renderCommand(cmd: ra.CommandLink) {
-    return `[${cmd.title}](command:${cmd.command}?${encodeURIComponent(JSON.stringify(cmd.arguments))} '${cmd.tooltip!}')`;
+    return `[${cmd.title}](command:${cmd.command}?${encodeURIComponent(JSON.stringify(cmd.arguments))} '${cmd.tooltip}')`;
 }
 
 function renderHoverActions(actions: ra.CommandLinkGroup[]): vscode.MarkdownString {
@@ -138,7 +138,7 @@ export function createClient(serverPath: string, cwd: string, extraEnv: Env): lc
                                 command: "rust-analyzer.applyActionGroup",
                                 title: "",
                                 arguments: [items.map((item) => {
-                                    return { label: item.title, arguments: item.command!!.arguments!![0] };
+                                    return { label: item.title, arguments: item.command.arguments[0] };
                                 })],
                             };