aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src/project_json.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/project_model/src/project_json.rs')
-rw-r--r--crates/project_model/src/project_json.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/project_model/src/project_json.rs b/crates/project_model/src/project_json.rs
index 5a0fe749a..979e90058 100644
--- a/crates/project_model/src/project_json.rs
+++ b/crates/project_model/src/project_json.rs
@@ -7,12 +7,12 @@ use paths::{AbsPath, AbsPathBuf};
7use rustc_hash::FxHashMap; 7use rustc_hash::FxHashMap;
8use serde::{de, Deserialize}; 8use serde::{de, Deserialize};
9 9
10use crate::{cfg_flag::CfgFlag, Sysroot}; 10use crate::cfg_flag::CfgFlag;
11 11
12/// Roots and crates that compose this Rust project. 12/// Roots and crates that compose this Rust project.
13#[derive(Clone, Debug, Eq, PartialEq)] 13#[derive(Clone, Debug, Eq, PartialEq)]
14pub struct ProjectJson { 14pub struct ProjectJson {
15 pub(crate) sysroot: Option<Sysroot>, 15 pub(crate) sysroot_src: Option<AbsPathBuf>,
16 crates: Vec<Crate>, 16 crates: Vec<Crate>,
17} 17}
18 18
@@ -35,7 +35,7 @@ pub struct Crate {
35impl ProjectJson { 35impl ProjectJson {
36 pub fn new(base: &AbsPath, data: ProjectJsonData) -> ProjectJson { 36 pub fn new(base: &AbsPath, data: ProjectJsonData) -> ProjectJson {
37 ProjectJson { 37 ProjectJson {
38 sysroot: data.sysroot_src.map(|it| base.join(it)).map(|it| Sysroot::load(&it)), 38 sysroot_src: data.sysroot_src.map(|it| base.join(it)),
39 crates: data 39 crates: data
40 .crates 40 .crates
41 .into_iter() 41 .into_iter()