Skip to content

Commit 93fa5e2

Browse files
authored
Merge pull request #71 from PLSysSec/bug_fixes
Fixes support for every files path #69
2 parents 47fce3e + 2bb5743 commit 93fa5e2

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎editor-plugin/package-lock.json‎

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lang_server/src/server.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::HashMap, error::Error, path::PathBuf, str::FromStr};
1+
use std::{collections::HashMap, error::Error, path::PathBuf};
22

33
use anyhow::{anyhow, Context};
44
use cargo_scan::{
@@ -105,7 +105,9 @@ fn runner(
105105
.and_then(|folders| folders.first().map(|folder| folder.uri.clone()))
106106
.ok_or_else(|| anyhow!("Couldn't get root path from workspace folders"))?;
107107

108-
let root_crate_path = std::path::PathBuf::from_str(root_uri.path())?;
108+
let root_crate_path = root_uri
109+
.to_file_path()
110+
.map_err(|_| anyhow!("Could not convert root URI to file path"))?;
109111
info!("Crate path received in cargo-scan LSP server: {}", root_crate_path.display());
110112

111113
let scan_res =

0 commit comments

Comments
 (0)