]> git.lizzy.rs Git - rust.git/commitdiff
remove useless Arc
authorAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 18 Feb 2019 11:05:08 +0000 (14:05 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 18 Feb 2019 11:05:08 +0000 (14:05 +0300)
crates/ra_vfs/src/roots.rs

index 5e2776a35871fb04cf61a327c6062f49a14fad3b..9d3918502c44c119e4461edc945245757ddd62db 100644 (file)
@@ -1,6 +1,5 @@
 use std::{
     iter,
-    sync::Arc,
     path::{Path, PathBuf},
 };
 
@@ -25,7 +24,7 @@ struct RootData {
 }
 
 pub(crate) struct Roots {
-    roots: Arena<VfsRoot, Arc<RootData>>,
+    roots: Arena<VfsRoot, RootData>,
 }
 
 impl Roots {
@@ -38,9 +37,7 @@ pub(crate) fn new(mut paths: Vec<PathBuf>) -> Roots {
             let nested_roots =
                 paths[..i].iter().filter_map(|it| rel_path(path, it)).collect::<Vec<_>>();
 
-            let config = Arc::new(RootData::new(path.clone(), nested_roots));
-
-            roots.alloc(config.clone());
+            roots.alloc(RootData::new(path.clone(), nested_roots));
         }
         Roots { roots }
     }