aboutsummaryrefslogtreecommitdiff
path: root/crates/vfs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-02 13:08:53 +0000
committerGitHub <[email protected]>2020-11-02 13:08:53 +0000
commit731b38fa3c1694648e6c8e60f61820f9783343eb (patch)
treeb3f4e94e8eac9bb24296aacafacb100930bee59e /crates/vfs
parent6507877e7039d4517682a4fc232356662f509d81 (diff)
parentb6101184537b1165cfdd5fc473e04ad4c5b7bffa (diff)
Merge #6438
6438: Deny unreachable-pub r=matklad a=matklad 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. Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/vfs')
-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..],