aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src
diff options
context:
space:
mode:
authorFelix S. Klock II <[email protected]>2019-02-13 21:31:33 +0000
committerFelix S. Klock II <[email protected]>2019-02-13 21:31:33 +0000
commitda300fd55340ca1c65914744fa30c2b3b02e485f (patch)
tree062be32a4779a569b7c4251279cf24c98f2d88ea /crates/ra_vfs/src
parentcfed7c59f49d4a4dd5ac001f520278583c883559 (diff)
rustfmt
Diffstat (limited to 'crates/ra_vfs/src')
-rw-r--r--crates/ra_vfs/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs
index 2c3c35f28..d589a254b 100644
--- a/crates/ra_vfs/src/lib.rs
+++ b/crates/ra_vfs/src/lib.rs
@@ -72,12 +72,12 @@ impl RootConfig {
72 if self.excluded_dirs.iter().any(|it| path.starts_with(it)) { 72 if self.excluded_dirs.iter().any(|it| path.starts_with(it)) {
73 return None; 73 return None;
74 } 74 }
75 let rel_path = path.strip_prefix(&self.root) 75 let rel_path = path
76 .strip_prefix(&self.root)
76 .or_else(|err_payload| { 77 .or_else(|err_payload| {
77 self.canonical_root 78 self.canonical_root
78 .as_ref() 79 .as_ref()
79 .map_or(Err(err_payload), 80 .map_or(Err(err_payload), |canonical_root| path.strip_prefix(canonical_root))
80 |canonical_root| path.strip_prefix(canonical_root))
81 }) 81 })
82 .ok()?; 82 .ok()?;
83 let rel_path = RelativePathBuf::from_path(rel_path).ok()?; 83 let rel_path = RelativePathBuf::from_path(rel_path).ok()?;