mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Canonicalize rust-project.json manifest path
This commit is contained in:
parent
284c1741d6
commit
f1de133820
3 changed files with 12 additions and 7 deletions
|
@ -166,6 +166,11 @@ impl AbsPath {
|
|||
AbsPathBuf::try_from(self.0.to_path_buf()).unwrap()
|
||||
}
|
||||
|
||||
/// Equivalent of [`Path::canonicalize`] for `AbsPath`.
|
||||
pub fn canonicalize(&self) -> Result<AbsPathBuf, std::io::Error> {
|
||||
Ok(self.as_ref().canonicalize()?.try_into().unwrap())
|
||||
}
|
||||
|
||||
/// Equivalent of [`Path::strip_prefix`] for `AbsPath`.
|
||||
///
|
||||
/// Returns a relative path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue