mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Migrate to privacy as per review commets
This commit is contained in:
parent
bef899aa78
commit
6190caeeae
6 changed files with 25 additions and 15 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue