Skip to content

Commit 11bbaec

Browse files
committed
Formatting issues
1 parent 5e571a3 commit 11bbaec

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

crates/rust-analyzer/src/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! `ide` crate.
44
55
use std::{
6-
io::{Write as _},
6+
io::Write as _,
77
process::{self, Stdio},
88
};
99

editors/code/src/commands.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@ export function viewItemTree(ctx: Ctx): Cmd {
473473

474474
function crateGraph(ctx: Ctx, full: boolean): Cmd {
475475
return async () => {
476-
const node_modules_path = vscode.Uri.file(path.join(ctx.extensionPath, "node_modules"));
476+
const nodeModulesPath = vscode.Uri.file(path.join(ctx.extensionPath, "node_modules"));
477477

478478
const panel = vscode.window.createWebviewPanel("rust-analyzer.crate-graph", "rust-analyzer crate graph", vscode.ViewColumn.Two, {
479479
enableScripts: true,
480480
retainContextWhenHidden: true,
481-
localResourceRoots: [node_modules_path]
481+
localResourceRoots: [nodeModulesPath]
482482
});
483483
const params = {
484484
full: full,
@@ -487,15 +487,15 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
487487
const dot = await ctx.client.sendRequest(ra.viewCrateGraph, params);
488488

489489
const scripts = [
490-
{ file: vscode.Uri.joinPath(node_modules_path, 'd3', 'dist', 'd3.min.js') },
491-
{ file: vscode.Uri.joinPath(node_modules_path, '@hpcc-js', 'wasm', 'dist', 'index.min.js'), worker: true },
492-
{ file: vscode.Uri.joinPath(node_modules_path, 'd3-graphviz', 'build', 'd3-graphviz.min.js') },
493-
]
490+
{ file: vscode.Uri.joinPath(nodeModulesPath, 'd3', 'dist', 'd3.min.js') },
491+
{ file: vscode.Uri.joinPath(nodeModulesPath, '@hpcc-js', 'wasm', 'dist', 'index.min.js'), worker: true },
492+
{ file: vscode.Uri.joinPath(nodeModulesPath, 'd3-graphviz', 'build', 'd3-graphviz.min.js') },
493+
];
494494

495-
const scripts_html = scripts.map(({ file, worker }) => {
496-
let uri = panel.webview.asWebviewUri(file);
497-
return `<script type="${worker ? "javascript/worker" : "text/javascript"}" src="${uri}"></script>`
498-
}).join("\n")
495+
const scriptsHtml = scripts.map(({ file, worker }) => {
496+
const uri = panel.webview.asWebviewUri(file);
497+
return `<script type="${worker ? "javascript/worker" : "text/javascript"}" src="${uri}"></script>`;
498+
}).join("\n");
499499

500500
const html = `
501501
<!DOCTYPE html>
@@ -515,7 +515,7 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
515515
</style>
516516
</head>
517517
<body>
518-
${scripts_html}
518+
${scriptsHtml}
519519
<div id="graph"></div>
520520
<script>
521521
let graph = d3.select("#graph")

0 commit comments

Comments
 (0)