From 5bf9d7e08212cd709ccb86542a327808939f73a0 Mon Sep 17 00:00:00 2001 From: IsaacShelton Date: Sat, 21 Sep 2024 13:45:43 -0500 Subject: [PATCH] Minor code improvements with importing namespaces --- src/resolve/mod.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/resolve/mod.rs b/src/resolve/mod.rs index fc6bb55..b4fc5b3 100644 --- a/src/resolve/mod.rs +++ b/src/resolve/mod.rs @@ -281,12 +281,9 @@ pub fn resolve<'a>( ctx.jobs .push_back(Job::Regular(*real_file_id, function_i, function_ref)); - let imported_namespaces = - if let Some(settings) = file.settings.map(|id| &ast_workspace.settings[id.0]) { - Some(&settings.imported_namespaces) - } else { - None - }; + let imported_namespaces = file + .settings + .map(|id| &ast_workspace.settings[id.0].imported_namespaces); let function_search_context = ctx.function_search_ctxs.get_or_insert_with(file_id, || {