From 6190caeeaedd026e02640fb30691d835d72a8899 Mon Sep 17 00:00:00 2001 From: veetaha Date: Wed, 1 Apr 2020 13:40:40 +0300 Subject: Migrate to privacy as per review commets --- crates/ra_project_model/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'crates/ra_project_model') 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 { #[derive(Clone)] pub struct PackageRoot { /// Path to the root folder - pub path: PathBuf, + path: PathBuf, /// Is a member of the current workspace - pub is_member: bool, + is_member: bool, } impl PackageRoot { pub fn new_member(path: PathBuf) -> PackageRoot { @@ -69,6 +69,12 @@ impl PackageRoot { pub fn new_non_member(path: PathBuf) -> PackageRoot { Self { path, is_member: false } } + pub fn path(&self) -> &Path { + &self.path + } + pub fn is_member(&self) -> bool { + self.is_member + } } impl ProjectWorkspace { -- cgit v1.2.3