This commit is contained in:
Aleksey Kladov 2020-06-11 11:04:09 +02:00
parent 7aa66371ee
commit dad1333b48
46 changed files with 1028 additions and 1001 deletions

View file

@ -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())
}