Skip to content

Commit

Permalink
Minor code improvements with importing namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Sep 21, 2024
1 parent 6070e31 commit 5bf9d7e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, || {
Expand Down

0 comments on commit 5bf9d7e

Please sign in to comment.