diff options
Diffstat (limited to 'crates/ra_vfs/src')
-rw-r--r-- | crates/ra_vfs/src/io.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_vfs/src/io.rs b/crates/ra_vfs/src/io.rs index be400bae9..4cfdb83da 100644 --- a/crates/ra_vfs/src/io.rs +++ b/crates/ra_vfs/src/io.rs | |||
@@ -8,7 +8,7 @@ use walkdir::{DirEntry, WalkDir}; | |||
8 | use thread_worker::{WorkerHandle}; | 8 | use thread_worker::{WorkerHandle}; |
9 | use relative_path::RelativePathBuf; | 9 | use relative_path::RelativePathBuf; |
10 | 10 | ||
11 | use crate::VfsRoot; | 11 | use crate::{VfsRoot, has_rs_extension}; |
12 | 12 | ||
13 | pub(crate) struct Task { | 13 | pub(crate) struct Task { |
14 | pub(crate) root: VfsRoot, | 14 | pub(crate) root: VfsRoot, |
@@ -59,7 +59,7 @@ fn load_root(root: &Path, filter: &dyn Fn(&DirEntry) -> bool) -> Vec<(RelativePa | |||
59 | continue; | 59 | continue; |
60 | } | 60 | } |
61 | let path = entry.path(); | 61 | let path = entry.path(); |
62 | if path.extension().and_then(|os| os.to_str()) != Some("rs") { | 62 | if !has_rs_extension(path) { |
63 | continue; | 63 | continue; |
64 | } | 64 | } |
65 | let text = match fs::read_to_string(path) { | 65 | let text = match fs::read_to_string(path) { |