diff options
Diffstat (limited to 'crates/ra_vfs/src/roots.rs')
-rw-r--r-- | crates/ra_vfs/src/roots.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_vfs/src/roots.rs b/crates/ra_vfs/src/roots.rs index 5e2776a35..9d3918502 100644 --- a/crates/ra_vfs/src/roots.rs +++ b/crates/ra_vfs/src/roots.rs | |||
@@ -1,6 +1,5 @@ | |||
1 | use std::{ | 1 | use std::{ |
2 | iter, | 2 | iter, |
3 | sync::Arc, | ||
4 | path::{Path, PathBuf}, | 3 | path::{Path, PathBuf}, |
5 | }; | 4 | }; |
6 | 5 | ||
@@ -25,7 +24,7 @@ struct RootData { | |||
25 | } | 24 | } |
26 | 25 | ||
27 | pub(crate) struct Roots { | 26 | pub(crate) struct Roots { |
28 | roots: Arena<VfsRoot, Arc<RootData>>, | 27 | roots: Arena<VfsRoot, RootData>, |
29 | } | 28 | } |
30 | 29 | ||
31 | impl Roots { | 30 | impl Roots { |
@@ -38,9 +37,7 @@ impl Roots { | |||
38 | let nested_roots = | 37 | let nested_roots = |
39 | paths[..i].iter().filter_map(|it| rel_path(path, it)).collect::<Vec<_>>(); | 38 | paths[..i].iter().filter_map(|it| rel_path(path, it)).collect::<Vec<_>>(); |
40 | 39 | ||
41 | let config = Arc::new(RootData::new(path.clone(), nested_roots)); | 40 | roots.alloc(RootData::new(path.clone(), nested_roots)); |
42 | |||
43 | roots.alloc(config.clone()); | ||
44 | } | 41 | } |
45 | Roots { roots } | 42 | Roots { roots } |
46 | } | 43 | } |