aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/utils
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-11-14 09:59:23 +0000
committerKirill Bulatov <[email protected]>2020-11-16 19:19:06 +0000
commit38ef1fd4ad7fd26439201a1a4147a7d90a13601f (patch)
tree5966e1410112455b0ec4957befb311bba41f03bc /crates/assists/src/utils
parentee99620754cdcfbab28a2c067dfa31087376d6c3 (diff)
Better filter mod paths
Diffstat (limited to 'crates/assists/src/utils')
-rw-r--r--crates/assists/src/utils/import_assets.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/utils/import_assets.rs b/crates/assists/src/utils/import_assets.rs
index 89e62ba79..ff5c0e78e 100644
--- a/crates/assists/src/utils/import_assets.rs
+++ b/crates/assists/src/utils/import_assets.rs
@@ -195,7 +195,7 @@ impl ImportAssets {
195 } 195 }
196 .map(|path| (path, item)) 196 .map(|path| (path, item))
197 }) 197 })
198 .filter(|(use_path, _)| !use_path.segments.is_empty()) 198 .filter(|(use_path, _)| use_path.len() > 1)
199 .take(20) 199 .take(20)
200 .collect::<Vec<_>>(); 200 .collect::<Vec<_>>();
201 res.sort_by_key(|(path, _)| path.clone()); 201 res.sort_by_key(|(path, _)| path.clone());