aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model/src/lib.rs')
-rw-r--r--crates/ra_project_model/src/lib.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index ec8574952..0ab64a1e0 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -58,9 +58,9 @@ pub enum ProjectWorkspace {
58#[derive(Clone)] 58#[derive(Clone)]
59pub struct PackageRoot { 59pub struct PackageRoot {
60 /// Path to the root folder 60 /// Path to the root folder
61 pub path: PathBuf, 61 path: PathBuf,
62 /// Is a member of the current workspace 62 /// Is a member of the current workspace
63 pub is_member: bool, 63 is_member: bool,
64} 64}
65impl PackageRoot { 65impl PackageRoot {
66 pub fn new_member(path: PathBuf) -> PackageRoot { 66 pub fn new_member(path: PathBuf) -> PackageRoot {
@@ -69,6 +69,12 @@ impl PackageRoot {
69 pub fn new_non_member(path: PathBuf) -> PackageRoot { 69 pub fn new_non_member(path: PathBuf) -> PackageRoot {
70 Self { path, is_member: false } 70 Self { path, is_member: false }
71 } 71 }
72 pub fn path(&self) -> &Path {
73 &self.path
74 }
75 pub fn is_member(&self) -> bool {
76 self.is_member
77 }
72} 78}
73 79
74impl ProjectWorkspace { 80impl ProjectWorkspace {