[fractal] API, Backend: replace Clone impl with derive
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] API, Backend: replace Clone impl with derive
- Date: Thu, 29 Aug 2019 21:40:46 +0000 (UTC)
commit fb77a4c163b71481bad690a241ffd018ac8a97f5
Author: Alejandro DomÃnguez <adomu net-c com>
Date: Thu Aug 29 23:07:47 2019 +0200
API, Backend: replace Clone impl with derive
fractal-matrix-api/src/backend/types.rs | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/fractal-matrix-api/src/backend/types.rs b/fractal-matrix-api/src/backend/types.rs
index afb66cb6..4cf5434a 100644
--- a/fractal-matrix-api/src/backend/types.rs
+++ b/fractal-matrix-api/src/backend/types.rs
@@ -199,6 +199,7 @@ pub struct BackendData {
pub m_direct: HashMap<String, Vec<String>>,
}
+#[derive(Clone)]
pub struct Backend {
pub tx: Sender<BKResponse>,
pub data: Arc<Mutex<BackendData>>,
@@ -209,15 +210,3 @@ pub struct Backend {
// semaphore to limit the number of threads downloading images
pub limit_threads: Arc<(Mutex<u8>, Condvar)>,
}
-
-impl Clone for Backend {
- fn clone(&self) -> Backend {
- Backend {
- tx: self.tx.clone(),
- data: self.data.clone(),
- internal_tx: self.internal_tx.clone(),
- user_info_cache: self.user_info_cache.clone(),
- limit_threads: self.limit_threads.clone(),
- }
- }
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]