diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-10-13 13:39:42 +0200 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-10-14 11:30:08 +0200 |
commit | d82038775807faf3dcce7ec72e1f0d5213105888 (patch) | |
tree | 6cc84455d14aaeff55c3d3f49f83782b2ecba70b /components/net/filemanager_thread.rs | |
parent | 53b6343f3c2bb54bf2f541d88efcb4ce47e4eb7a (diff) | |
download | servo-d82038775807faf3dcce7ec72e1f0d5213105888.tar.gz servo-d82038775807faf3dcce7ec72e1f0d5213105888.zip |
Stop wrapping FileManager in an Arc.
It already contains an Arc internally.
Diffstat (limited to 'components/net/filemanager_thread.rs')
-rw-r--r-- | components/net/filemanager_thread.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs index ac8ad70d1bc..d682ea02569 100644 --- a/components/net/filemanager_thread.rs +++ b/components/net/filemanager_thread.rs @@ -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 { |