diff options
author | veetaha <[email protected]> | 2020-04-01 11:40:40 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-04-02 19:09:03 +0100 |
commit | 6190caeeaedd026e02640fb30691d835d72a8899 (patch) | |
tree | 95e41aecd4e6a2da586dffcca70e98877a491896 /crates/rust-analyzer/src/main_loop.rs | |
parent | bef899aa78f65dbf4ee0d304c171ba02e101a685 (diff) |
Migrate to privacy as per review commets
Diffstat (limited to 'crates/rust-analyzer/src/main_loop.rs')
-rw-r--r-- | crates/rust-analyzer/src/main_loop.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs index e61a56935..8d1429196 100644 --- a/crates/rust-analyzer/src/main_loop.rs +++ b/crates/rust-analyzer/src/main_loop.rs | |||
@@ -23,6 +23,7 @@ use lsp_types::{ | |||
23 | use ra_flycheck::{url_from_path_with_drive_lowercasing, CheckTask}; | 23 | use ra_flycheck::{url_from_path_with_drive_lowercasing, CheckTask}; |
24 | use ra_ide::{Canceled, FileId, LibraryData, SourceRootId}; | 24 | use ra_ide::{Canceled, FileId, LibraryData, SourceRootId}; |
25 | use ra_prof::profile; | 25 | use ra_prof::profile; |
26 | use ra_project_model::{PackageRoot, ProjectWorkspace}; | ||
26 | use ra_vfs::{VfsFile, VfsTask, Watch}; | 27 | use ra_vfs::{VfsFile, VfsTask, Watch}; |
27 | use relative_path::RelativePathBuf; | 28 | use relative_path::RelativePathBuf; |
28 | use rustc_hash::FxHashSet; | 29 | use rustc_hash::FxHashSet; |
@@ -131,9 +132,9 @@ pub fn main_loop(ws_roots: Vec<PathBuf>, config: Config, connection: Connection) | |||
131 | let registration_options = req::DidChangeWatchedFilesRegistrationOptions { | 132 | let registration_options = req::DidChangeWatchedFilesRegistrationOptions { |
132 | watchers: workspaces | 133 | watchers: workspaces |
133 | .iter() | 134 | .iter() |
134 | .flat_map(|ws| ws.to_roots()) | 135 | .flat_map(ProjectWorkspace::to_roots) |
135 | .filter(|root| root.is_member) | 136 | .filter(PackageRoot::is_member) |
136 | .map(|root| format!("{}/**/*.rs", root.path.display())) | 137 | .map(|root| format!("{}/**/*.rs", root.path().display())) |
137 | .map(|glob_pattern| req::FileSystemWatcher { glob_pattern, kind: None }) | 138 | .map(|glob_pattern| req::FileSystemWatcher { glob_pattern, kind: None }) |
138 | .collect(), | 139 | .collect(), |
139 | }; | 140 | }; |