Simplify
This commit is contained in:
@@ -96,13 +96,11 @@ pub fn main_loop(ws_roots: Vec<PathBuf>, config: Config, connection: Connection)
|
|||||||
let mut world_state = {
|
let mut world_state = {
|
||||||
let workspaces = {
|
let workspaces = {
|
||||||
// FIXME: support dynamic workspace loading.
|
// FIXME: support dynamic workspace loading.
|
||||||
let mut visited = FxHashSet::default();
|
let project_roots: FxHashSet<_> = ws_roots
|
||||||
let project_roots = ws_roots
|
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|it| ra_project_model::ProjectRoot::discover(it).ok())
|
.filter_map(|it| ra_project_model::ProjectRoot::discover(it).ok())
|
||||||
.flatten()
|
.flatten()
|
||||||
.filter(|it| visited.insert(it.clone()))
|
.collect();
|
||||||
.collect::<Vec<_>>();
|
|
||||||
|
|
||||||
if project_roots.is_empty() && config.notifications.cargo_toml_not_found {
|
if project_roots.is_empty() && config.notifications.cargo_toml_not_found {
|
||||||
show_message(
|
show_message(
|
||||||
|
|||||||
Reference in New Issue
Block a user