mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -34,6 +34,11 @@ impl ManifestPath {
|
|||
pub fn parent(&self) -> &AbsPath {
|
||||
self.file.parent().unwrap()
|
||||
}
|
||||
|
||||
/// Equivalent of [`Path::canonicalize`] for `ManifestPath`.
|
||||
pub fn canonicalize(&self) -> Result<ManifestPath, std::io::Error> {
|
||||
Ok((&**self).canonicalize()?.try_into().unwrap())
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Deref for ManifestPath {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue