mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Cleanup
This commit is contained in:
parent
afce8e4426
commit
d3df80dfe4
7 changed files with 17 additions and 27 deletions
|
@ -1,11 +1,11 @@
|
|||
use join_to_string::join;
|
||||
|
||||
use hir::{Docs, Resolution};
|
||||
|
||||
use crate::{
|
||||
completion::{CompletionItem, CompletionItemKind, Completions, CompletionKind, CompletionContext},
|
||||
};
|
||||
|
||||
use hir::Docs;
|
||||
|
||||
pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
let path = match &ctx.path_prefix {
|
||||
Some(path) => path.clone(),
|
||||
|
@ -15,7 +15,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
Some(Resolution::Def { def }) => def,
|
||||
_ => return,
|
||||
};
|
||||
match def_id {
|
||||
match def {
|
||||
hir::ModuleDef::Module(module) => {
|
||||
let module_scope = module.scope(ctx.db);
|
||||
for (name, res) in module_scope.entries() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue