diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-01-03 14:55:39 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2024-01-03 15:21:18 +0100 |
| commit | 3fc043ce9b6bd5b802af95c3dc50816a581293bc (patch) | |
| tree | eca4e61022aa0aba66a3ba7e3441c2acd794f314 /editors/code/src | |
| parent | 426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746 (diff) | |
internal: Remove unnecessary Arc allocations in `macro_expand`
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/config.ts | 1 | ||||
| -rw-r--r-- | editors/code/src/ctx.ts | 1 | ||||
| -rw-r--r-- | editors/code/src/main.ts | 1 | ||||
| -rw-r--r-- | editors/code/src/rust_project.ts | 6 |
4 files changed, 6 insertions, 3 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 987d936943a..51a0aece820 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -5,6 +5,7 @@ import * as vscode from "vscode"; import type { Env } from "./client"; import { log } from "./util"; import { expectNotUndefined, unwrapUndefinable } from "./undefinable"; +import type { JsonProject } from "./rust_project"; export type RunnableEnvCfgItem = { mask?: string; diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 63ae386c8ad..55163241c2a 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts @@ -23,6 +23,7 @@ import { execRevealDependency } from "./commands"; import { PersistentState } from "./persistent_state"; import { bootstrap } from "./bootstrap"; import type { RustAnalyzerExtensionApi } from "./main"; +import type { JsonProject } from "./rust_project"; // We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if // only those are in use. We use "Empty" to represent these scenarios diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 3073353674c..599cfb4ff77 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -6,6 +6,7 @@ import { type CommandFactory, Ctx, fetchWorkspace } from "./ctx"; import * as diagnostics from "./diagnostics"; import { activateTaskProvider } from "./tasks"; import { setContextValue } from "./util"; +import type { JsonProject } from "./rust_project"; const RUST_PROJECT_CONTEXT_NAME = "inRustProject"; diff --git a/editors/code/src/rust_project.ts b/editors/code/src/rust_project.ts index 187a1a96c10..bf65ad43ba5 100644 --- a/editors/code/src/rust_project.ts +++ b/editors/code/src/rust_project.ts @@ -1,4 +1,4 @@ -interface JsonProject { +export interface JsonProject { /// Path to the directory with *source code* of /// sysroot crates. /// @@ -21,7 +21,7 @@ interface JsonProject { crates: Crate[]; } -interface Crate { +export interface Crate { /// Optional crate name used for display purposes, /// without affecting semantics. See the `deps` /// key for semantically-significant crate names. @@ -82,7 +82,7 @@ interface Crate { proc_macro_dylib_path?: string; } -interface Dep { +export interface Dep { /// Index of a crate in the `crates` array. crate: number; /// Name as should appear in the (implicit) |
