aboutsummaryrefslogtreecommitdiff
path: root/crates/paths
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-11 10:04:09 +0100
committerAleksey Kladov <[email protected]>2020-06-23 16:51:06 +0100
commitdad1333b48c38bc7a5628fc0ff5304d003776a85 (patch)
tree29be52a980b4cae72f46a48c48135a15e31641e0 /crates/paths
parent7aa66371ee3e8b31217513204c8b4f683584419d (diff)
New VFS
Diffstat (limited to 'crates/paths')
-rw-r--r--crates/paths/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/paths/src/lib.rs b/crates/paths/src/lib.rs
index 32267f2e6..45b19c45a 100644
--- a/crates/paths/src/lib.rs
+++ b/crates/paths/src/lib.rs
@@ -2,7 +2,7 @@
2//! relative paths. 2//! relative paths.
3use std::{ 3use std::{
4 convert::{TryFrom, TryInto}, 4 convert::{TryFrom, TryInto},
5 io, ops, 5 ops,
6 path::{Component, Path, PathBuf}, 6 path::{Component, Path, PathBuf},
7}; 7};
8 8
@@ -46,9 +46,6 @@ impl TryFrom<&str> for AbsPathBuf {
46} 46}
47 47
48impl AbsPathBuf { 48impl AbsPathBuf {
49 pub fn canonicalized(path: &Path) -> io::Result<AbsPathBuf> {
50 path.canonicalize().map(|it| AbsPathBuf::try_from(it).unwrap())
51 }
52 pub fn as_path(&self) -> &AbsPath { 49 pub fn as_path(&self) -> &AbsPath {
53 AbsPath::new_unchecked(self.0.as_path()) 50 AbsPath::new_unchecked(self.0.as_path())
54 } 51 }