From 0c3be014ec7108df4bb6460b54fdf46314e059a7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 30 Dec 2020 13:38:37 +0300 Subject: Simplify --- crates/hir_def/src/import_map.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/hir_def/src') 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 { mod tests { use base_db::{fixture::WithFixture, SourceDatabase, Upcast}; use expect_test::{expect, Expect}; + use stdx::format_to; use crate::{data::FunctionData, test_db::TestDB, AssocContainerId, Lookup}; @@ -467,9 +468,10 @@ mod tests { if let ItemInNs::Types(ModuleDefId::FunctionId(function_id)) | ItemInNs::Values(ModuleDefId::FunctionId(function_id)) = item { - full_path += &format!( + format_to!( + full_path, "::{}", - FunctionData::fn_data_query(&db, function_id).name + FunctionData::fn_data_query(&db, function_id).name, ); } full_path -- cgit v1.2.3