Skip to content

Commit

Permalink
fix panic 2
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed Jun 28, 2024
1 parent 3c0e47f commit ba2dfd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ast/ast_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@ impl AstModule {
);
let symbol_to_search_res = |x: &AstSymbolInstanceRc| {
let symbol_declaration = x.borrow().symbol_info_struct();
let content = symbol_declaration.get_content(&code.to_string()).unwrap_or_default();
let content = if symbol_declaration.file_path == doc.path {
symbol_declaration.get_content(&code.to_string()).unwrap_or_default()
} else {
symbol_declaration.get_content_from_file_blocked().unwrap_or_default()
};
let usefulness = *guid_to_usefulness
.get(&symbol_declaration.guid)
.expect("Guid has not found in `guid_to_usefulness` dict, \
Expand Down

0 comments on commit ba2dfd5

Please sign in to comment.