diff options
Diffstat (limited to 'crates/ra_project_model/src/cargo_workspace.rs')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 81cb506b7..71976071f 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -19,6 +19,7 @@ use crate::Result; | |||
19 | pub struct CargoWorkspace { | 19 | pub struct CargoWorkspace { |
20 | packages: Arena<Package, PackageData>, | 20 | packages: Arena<Package, PackageData>, |
21 | targets: Arena<Target, TargetData>, | 21 | targets: Arena<Target, TargetData>, |
22 | pub(crate) workspace_root: PathBuf, | ||
22 | } | 23 | } |
23 | 24 | ||
24 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 25 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
@@ -165,7 +166,7 @@ impl CargoWorkspace { | |||
165 | } | 166 | } |
166 | } | 167 | } |
167 | 168 | ||
168 | Ok(CargoWorkspace { packages, targets }) | 169 | Ok(CargoWorkspace { packages, targets, workspace_root: meta.workspace_root }) |
169 | } | 170 | } |
170 | 171 | ||
171 | pub fn packages<'a>(&'a self) -> impl Iterator<Item = Package> + 'a { | 172 | pub fn packages<'a>(&'a self) -> impl Iterator<Item = Package> + 'a { |