From 46b4f89c920c314caf1a8af2abdb09732d100d67 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Jan 2021 01:56:11 +0300 Subject: . --- crates/ide_db/src/symbol_index.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide_db/src/symbol_index.rs') diff --git a/crates/ide_db/src/symbol_index.rs b/crates/ide_db/src/symbol_index.rs index 0aa6a0765..500bdfd6b 100644 --- a/crates/ide_db/src/symbol_index.rs +++ b/crates/ide_db/src/symbol_index.rs @@ -209,7 +209,7 @@ pub fn crate_symbols(db: &RootDatabase, krate: CrateId, query: Query) -> Vec Vec { +pub fn index_resolve(db: &RootDatabase, name: &str) -> Vec { let mut query = Query::new(name.to_string()); query.exact(); query.limit(4); @@ -409,7 +409,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { fn decl(node: N) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { let name = node.name()?; let name_range = name.syntax().text_range(); - let name = name.text().clone(); + let name = name.text().into(); let ptr = SyntaxNodePtr::new(node.syntax()); Some((name, ptr, name_range)) -- cgit v1.2.3