Simpify workspace handling

This commit is contained in:
veetaha
2020-04-01 02:15:20 +03:00
parent 4b2bf9cf66
commit b7d5172f69
7 changed files with 62 additions and 82 deletions

View File

@@ -132,8 +132,8 @@ pub fn main_loop(ws_roots: Vec<PathBuf>, config: Config, connection: Connection)
watchers: workspaces
.iter()
.flat_map(|ws| ws.to_roots())
.filter(|root| root.is_member())
.map(|root| format!("{}/**/*.rs", root.path().display()))
.filter(|root| root.is_member)
.map(|root| format!("{}/**/*.rs", root.path.display()))
.map(|glob_pattern| req::FileSystemWatcher { glob_pattern, kind: None })
.collect(),
};