aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-18 11:05:08 +0000
committerAleksey Kladov <[email protected]>2019-02-18 11:05:08 +0000
commitd151b2a655057b9da45243d0f4e160b10a98ac37 (patch)
tree485e3d4f972857e4327668bb83720d2d0d192387
parentbd2b4ef2d1c631215523f79a8138cfa8cbd3f70e (diff)
remove useless Arc
-rw-r--r--crates/ra_vfs/src/roots.rs7
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 @@
1use std::{ 1use 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
27pub(crate) struct Roots { 26pub(crate) struct Roots {
28 roots: Arena<VfsRoot, Arc<RootData>>, 27 roots: Arena<VfsRoot, RootData>,
29} 28}
30 29
31impl Roots { 30impl 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 }