Skip to content

Commit

Permalink
LS: Take FileId by value in map_cairo_diagnostics_to_lsp (#6590)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaput authored Nov 6, 2024
1 parent 73a1166 commit 70abf3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/cairo-lang-language-server/src/lang/diagnostics/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn map_cairo_diagnostics_to_lsp<T: DiagnosticEntry>(
db: &T::DbType,
diags: &mut Vec<Diagnostic>,
diagnostics: &Diagnostics<T>,
processed_file_id: &FileId,
processed_file_id: FileId,
trace_macro_diagnostics: bool,
) {
for diagnostic in if trace_macro_diagnostics {
Expand Down Expand Up @@ -56,7 +56,7 @@ pub fn map_cairo_diagnostics_to_lsp<T: DiagnosticEntry>(
continue;
};

if mapped_file_id != *processed_file_id {
if mapped_file_id != processed_file_id {
continue;
}
diags.push(Diagnostic {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,21 @@ fn refresh_file_diagnostics(
(*db).upcast(),
&mut diags,
&new_file_diagnostics.parser,
&file,
file,
trace_macro_diagnostics,
);
map_cairo_diagnostics_to_lsp(
(*db).upcast(),
&mut diags,
&new_file_diagnostics.semantic,
&file,
file,
trace_macro_diagnostics,
);
map_cairo_diagnostics_to_lsp(
(*db).upcast(),
&mut diags,
&new_file_diagnostics.lowering,
&file,
file,
trace_macro_diagnostics,
);

Expand Down

0 comments on commit 70abf3a

Please sign in to comment.