From d151b2a655057b9da45243d0f4e160b10a98ac37 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 14:05:08 +0300 Subject: remove useless Arc --- crates/ra_vfs/src/roots.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'crates/ra_vfs/src') 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 @@ use std::{ iter, - sync::Arc, path::{Path, PathBuf}, }; @@ -25,7 +24,7 @@ struct RootData { } pub(crate) struct Roots { - roots: Arena>, + roots: Arena, } impl Roots { @@ -38,9 +37,7 @@ impl Roots { let nested_roots = paths[..i].iter().filter_map(|it| rel_path(path, it)).collect::>(); - let config = Arc::new(RootData::new(path.clone(), nested_roots)); - - roots.alloc(config.clone()); + roots.alloc(RootData::new(path.clone(), nested_roots)); } Roots { roots } } -- cgit v1.2.3