From 4e98257438b44d8495a5aa1c0014ddbea6d47506 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Tue, 19 May 2026 04:36:35 +0200 Subject: [PATCH] Improved paths --- src/builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/builder.rs b/src/builder.rs index 06a8b22..0dbfd29 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -13,7 +13,7 @@ use crate::transpiler::Config; #[derive(Debug, Clone)] pub struct MistDiagnosticMessage { pub message: String, - pub file_path: String, + pub file_path: PathBuf, pub file_name: String, pub line: usize, pub column: usize, @@ -76,12 +76,12 @@ pub fn build( let mist_msg = MistDiagnosticMessage { message: span.label.clone().unwrap_or(msg.message.message.clone()), - file_path: mist_path.to_string_lossy().to_string(), file_name: if is_root { mist_file } else { mist_path.to_string_lossy().to_string() }, + file_path: mist_path, line: mist_span.1.0, column: mist_span.1.1, }; @@ -151,7 +151,7 @@ pub fn print_diagnostics(diagnostics: Vec) { } pub fn get_line( - files: &mut HashMap>, + files: &mut HashMap>, msg: &MistDiagnosticMessage, ) -> Option { let src_path = msg.file_path.clone();