Updated analyzer to remove the need for .mist/lib

This commit is contained in:
2026-05-31 12:56:54 +02:00
parent c4756262e1
commit b384f55c77
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -573,7 +573,7 @@ pub fn from_mist_to_rust(mut path: PathBuf) -> PathBuf {
let mut comps: Vec<Component> = path.components().collect();
if let Some(pos) = comps.iter().rposition(|c| c.as_os_str() == "src") {
let replacement = std::path::Path::new(".mist/lsp");
let replacement = std::path::Path::new(".mist/src");
comps.splice(pos..=pos, replacement.components());
comps.iter().collect()
} else {
@@ -587,8 +587,7 @@ pub fn from_rust_to_mist(mut path: PathBuf) -> PathBuf {
let comps: Vec<Component> = path.components().collect();
// pattern we originally inserted: ".mist/lsp"
let pattern: Vec<Component> = std::path::Path::new(".mist/lsp").components().collect();
let pattern: Vec<Component> = std::path::Path::new(".mist/src").components().collect();
// find the last occurrence of the pattern
if let Some(pos) = comps