Skip to content

Commit 04439c8

Browse files
authored
Merge pull request #19904 from Wilfred/project_json_naming
internal: Use 'ProjectJson' consistently
2 parents b9e6671 + 005d8c5 commit 04439c8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ impl ConfigChange {
11921192
#[derive(Debug, Clone, Eq, PartialEq)]
11931193
pub enum LinkedProject {
11941194
ProjectManifest(ProjectManifest),
1195-
InlineJsonProject(ProjectJson),
1195+
InlineProjectJson(ProjectJson),
11961196
}
11971197

11981198
impl From<ProjectManifest> for LinkedProject {
@@ -1203,7 +1203,7 @@ impl From<ProjectManifest> for LinkedProject {
12031203

12041204
impl From<ProjectJson> for LinkedProject {
12051205
fn from(v: ProjectJson) -> Self {
1206-
LinkedProject::InlineJsonProject(v)
1206+
LinkedProject::InlineProjectJson(v)
12071207
}
12081208
}
12091209

crates/rust-analyzer/src/reload.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl GlobalState {
292292

293293
if let (Some(_command), Some(path)) = (&discover_command, &path) {
294294
let build = linked_projects.iter().find_map(|project| match project {
295-
LinkedProject::InlineJsonProject(it) => it.crate_by_buildfile(path),
295+
LinkedProject::InlineProjectJson(it) => it.crate_by_buildfile(path),
296296
_ => None,
297297
});
298298

@@ -318,7 +318,7 @@ impl GlobalState {
318318
&progress,
319319
)
320320
}
321-
LinkedProject::InlineJsonProject(it) => {
321+
LinkedProject::InlineProjectJson(it) => {
322322
let workspace = project_model::ProjectWorkspace::load_inline(
323323
it.clone(),
324324
&cargo_config,

docs/book/src/non_cargo_based_projects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build system, you’ll have to describe the structure of your project for
55
rust-analyzer in the `rust-project.json` format:
66

77
```typescript
8-
interface JsonProject {
8+
interface ProjectJson {
99
/// Path to the sysroot directory.
1010
///
1111
/// The sysroot is where rustc looks for the

0 commit comments

Comments
 (0)