diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2025-06-02 11:21:46 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2025-06-02 11:21:46 +0100 |
| commit | d964f5dec26d1c898e522bad29eaae7d762b73dc (patch) | |
| tree | 291d026641122e23f101e853ad8c7d96d519e5cc /src/tools | |
| parent | 6a44c01e866f12ea3fd3b81fcc2ec4031c0f4966 (diff) | |
| download | rust-d964f5dec26d1c898e522bad29eaae7d762b73dc.tar.gz rust-d964f5dec26d1c898e522bad29eaae7d762b73dc.zip | |
internal: Use 'ProjectJson' consistently
The Rust source code previously mised ProjectJson and JsonProject, and the TypeScript definition didn't match either. Use 'ProjectJson' everywhere. This is purely an internal change.
Diffstat (limited to 'src/tools')
3 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index d1ca8c1a91a..96be6726ccb 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs @@ -1192,7 +1192,7 @@ impl ConfigChange { #[derive(Debug, Clone, Eq, PartialEq)] pub enum LinkedProject { ProjectManifest(ProjectManifest), - InlineJsonProject(ProjectJson), + InlineProjectJson(ProjectJson), } impl From<ProjectManifest> for LinkedProject { @@ -1203,7 +1203,7 @@ impl From<ProjectManifest> for LinkedProject { impl From<ProjectJson> for LinkedProject { fn from(v: ProjectJson) -> Self { - LinkedProject::InlineJsonProject(v) + LinkedProject::InlineProjectJson(v) } } diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs index ae9e3e99874..4677880daaf 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs @@ -292,7 +292,7 @@ impl GlobalState { if let (Some(_command), Some(path)) = (&discover_command, &path) { let build = linked_projects.iter().find_map(|project| match project { - LinkedProject::InlineJsonProject(it) => it.crate_by_buildfile(path), + LinkedProject::InlineProjectJson(it) => it.crate_by_buildfile(path), _ => None, }); @@ -318,7 +318,7 @@ impl GlobalState { &progress, ) } - LinkedProject::InlineJsonProject(it) => { + LinkedProject::InlineProjectJson(it) => { let workspace = project_model::ProjectWorkspace::load_inline( it.clone(), &cargo_config, diff --git a/src/tools/rust-analyzer/docs/book/src/non_cargo_based_projects.md b/src/tools/rust-analyzer/docs/book/src/non_cargo_based_projects.md index 151f8758a17..bbdb48bbbc9 100644 --- a/src/tools/rust-analyzer/docs/book/src/non_cargo_based_projects.md +++ b/src/tools/rust-analyzer/docs/book/src/non_cargo_based_projects.md @@ -5,7 +5,7 @@ build system, you’ll have to describe the structure of your project for rust-analyzer in the `rust-project.json` format: ```typescript -interface JsonProject { +interface ProjectJson { /// Path to the sysroot directory. /// /// The sysroot is where rustc looks for the |
