aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-12-30 10:38:37 +0000
committerAleksey Kladov <[email protected]>2020-12-30 10:38:37 +0000
commit0c3be014ec7108df4bb6460b54fdf46314e059a7 (patch)
tree68ff56bc1ebe5980308b3e045c9dea0f7751949e /crates
parent9d975320200e7d399661f04a0ba34b2fd0ba639b (diff)
Simplify
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_def/src/import_map.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_def/src/import_map.rs b/crates/hir_def/src/import_map.rs
index c4dc894df..30b22f51d 100644
--- a/crates/hir_def/src/import_map.rs
+++ b/crates/hir_def/src/import_map.rs
@@ -432,6 +432,7 @@ fn item_import_kind(item: ItemInNs) -> Option<ImportKind> {
432mod tests { 432mod tests {
433 use base_db::{fixture::WithFixture, SourceDatabase, Upcast}; 433 use base_db::{fixture::WithFixture, SourceDatabase, Upcast};
434 use expect_test::{expect, Expect}; 434 use expect_test::{expect, Expect};
435 use stdx::format_to;
435 436
436 use crate::{data::FunctionData, test_db::TestDB, AssocContainerId, Lookup}; 437 use crate::{data::FunctionData, test_db::TestDB, AssocContainerId, Lookup};
437 438
@@ -467,9 +468,10 @@ mod tests {
467 if let ItemInNs::Types(ModuleDefId::FunctionId(function_id)) 468 if let ItemInNs::Types(ModuleDefId::FunctionId(function_id))
468 | ItemInNs::Values(ModuleDefId::FunctionId(function_id)) = item 469 | ItemInNs::Values(ModuleDefId::FunctionId(function_id)) = item
469 { 470 {
470 full_path += &format!( 471 format_to!(
472 full_path,
471 "::{}", 473 "::{}",
472 FunctionData::fn_data_query(&db, function_id).name 474 FunctionData::fn_data_query(&db, function_id).name,
473 ); 475 );
474 } 476 }
475 full_path 477 full_path