mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-19 01:50:32 +00:00
New VFS
This commit is contained in:
parent
7aa66371ee
commit
dad1333b48
46 changed files with 1028 additions and 1001 deletions
|
@ -2,7 +2,7 @@
|
|||
//! relative paths.
|
||||
use std::{
|
||||
convert::{TryFrom, TryInto},
|
||||
io, ops,
|
||||
ops,
|
||||
path::{Component, Path, PathBuf},
|
||||
};
|
||||
|
||||
|
@ -46,9 +46,6 @@ impl TryFrom<&str> for AbsPathBuf {
|
|||
}
|
||||
|
||||
impl AbsPathBuf {
|
||||
pub fn canonicalized(path: &Path) -> io::Result<AbsPathBuf> {
|
||||
path.canonicalize().map(|it| AbsPathBuf::try_from(it).unwrap())
|
||||
}
|
||||
pub fn as_path(&self) -> &AbsPath {
|
||||
AbsPath::new_unchecked(self.0.as_path())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue