aboutsummaryrefslogtreecommitdiff
path: root/crates/vfs/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-02 12:13:32 +0000
committerAleksey Kladov <[email protected]>2020-11-02 13:07:08 +0000
commitb6101184537b1165cfdd5fc473e04ad4c5b7bffa (patch)
treebcc2efd8a2696840a4724ad88758e973ecb77157 /crates/vfs/src
parente7f90866bcf4b04a11e958eda0ac53f7ff0a607b (diff)
Deny unreachable-pub
It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
Diffstat (limited to 'crates/vfs/src')
-rw-r--r--crates/vfs/src/vfs_path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/vfs/src/vfs_path.rs b/crates/vfs/src/vfs_path.rs
index 022a0be1e..7a213fc3e 100644
--- a/crates/vfs/src/vfs_path.rs
+++ b/crates/vfs/src/vfs_path.rs
@@ -287,7 +287,7 @@ impl VirtualPath {
287 Some(res) 287 Some(res)
288 } 288 }
289 289
290 pub fn name_and_extension(&self) -> Option<(&str, Option<&str>)> { 290 pub(crate) fn name_and_extension(&self) -> Option<(&str, Option<&str>)> {
291 let file_path = if self.0.ends_with('/') { &self.0[..&self.0.len() - 1] } else { &self.0 }; 291 let file_path = if self.0.ends_with('/') { &self.0[..&self.0.len() - 1] } else { &self.0 };
292 let file_name = match file_path.rfind('/') { 292 let file_name = match file_path.rfind('/') {
293 Some(position) => &file_path[position + 1..], 293 Some(position) => &file_path[position + 1..],