From ef54e8451d2ebe20e900f9bea4545795ebd035c7 Mon Sep 17 00:00:00 2001 From: unexge Date: Wed, 19 Aug 2020 20:16:03 +0300 Subject: Use new `Definition::usages` API in expand glob import --- crates/assists/src/handlers/expand_glob_import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assists/src/handlers/expand_glob_import.rs b/crates/assists/src/handlers/expand_glob_import.rs index eb6dd68bb..b39d040f6 100644 --- a/crates/assists/src/handlers/expand_glob_import.rs +++ b/crates/assists/src/handlers/expand_glob_import.rs @@ -98,7 +98,7 @@ impl Def { }; let search_scope = SearchScope::single_file(ctx.frange.file_id); - !def.find_usages(&ctx.sema, Some(search_scope)).is_empty() + def.usages(&ctx.sema).in_scope(search_scope).at_least_one() } } -- cgit v1.2.3