Skip to content

Commit c8191c7

Browse files
committed
[FIX] server: borrow_mut on goto_definition
1 parent 8815310 commit c8191c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/core/odoo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,12 @@ impl Odoo {
11551155
if params.text_document_position_params.text_document.uri.to_string().ends_with(".py") ||
11561156
params.text_document_position_params.text_document.uri.to_string().ends_with(".pyi") {
11571157
if let Some(file_symbol) = SyncOdoo::get_symbol_of_opened_file(session, &PathBuf::from(path.clone())) {
1158-
let file_info = session.sync_odoo.get_file_mgr().borrow_mut().get_file_info(&path);
1158+
let file_info = session.sync_odoo.get_file_mgr().borrow().get_file_info(&path);
11591159
if let Some(file_info) = file_info {
11601160
if file_info.borrow().file_info_ast.borrow().ast.is_none() {
11611161
file_info.borrow_mut().prepare_ast(session);
11621162
}
1163-
if file_info.borrow_mut().file_info_ast.borrow().ast.is_some() {
1163+
if file_info.borrow().file_info_ast.borrow().ast.is_some() {
11641164
return Ok(DefinitionFeature::get_location(session, &file_symbol, &file_info, params.text_document_position_params.position.line, params.text_document_position_params.position.character));
11651165
}
11661166
}

0 commit comments

Comments
 (0)