mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +00:00
remove a couple of clones
This commit is contained in:
parent
6c9cf51c55
commit
573c47c9ba
32 changed files with 71 additions and 90 deletions
|
|
@ -86,7 +86,7 @@ pub fn items_with_name_in_module<T>(
|
|||
let local_query = match name {
|
||||
NameToImport::Prefix(exact_name, case_sensitive)
|
||||
| NameToImport::Exact(exact_name, case_sensitive) => {
|
||||
let mut local_query = symbol_index::Query::new(exact_name.clone());
|
||||
let mut local_query = symbol_index::Query::new(exact_name);
|
||||
local_query.assoc_search_mode(assoc_item_search);
|
||||
if prefix {
|
||||
local_query.prefix();
|
||||
|
|
@ -99,7 +99,7 @@ pub fn items_with_name_in_module<T>(
|
|||
local_query
|
||||
}
|
||||
NameToImport::Fuzzy(fuzzy_search_string, case_sensitive) => {
|
||||
let mut local_query = symbol_index::Query::new(fuzzy_search_string.clone());
|
||||
let mut local_query = symbol_index::Query::new(fuzzy_search_string);
|
||||
local_query.fuzzy();
|
||||
local_query.assoc_search_mode(assoc_item_search);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue