Stop wrapping FileManager in an Arc.

It already contains an Arc internally.
This commit is contained in:
Ms2ger 2016-10-13 13:39:42 +02:00
parent 53b6343f3c
commit d820387758
3 changed files with 13 additions and 4 deletions

View file

@ -116,6 +116,15 @@ pub struct FileManager<UI: 'static + UIProvider> {
store: Arc<FileManagerStore<UI>>,
}
// Not derived to avoid an unnecessary `UI: Clone` bound.
impl<UI: 'static + UIProvider> Clone for FileManager<UI> {
fn clone(&self) -> Self {
FileManager {
store: self.store.clone(),
}
}
}
impl<UI: 'static + UIProvider> FileManager<UI> {
pub fn new(ui: &'static UI) -> FileManager<UI> {
FileManager {