Merge pull request #19904 from Wilfred/project_json_naming

internal: Use 'ProjectJson' consistently
This commit is contained in:
Lukas Wirth 2025-06-02 11:13:14 +00:00 committed by GitHub
commit 1099b63858
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -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)
}
}

View file

@ -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,

View file

@ -5,7 +5,7 @@ build system, youll 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