From 8d487ac0971dd9b103c951dd30a0b81e8caf5a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 2 Apr 2020 17:27:39 +0200 Subject: [PATCH] crypto: Allow the device store to be cloned. --- src/crypto/memory_stores.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crypto/memory_stores.rs b/src/crypto/memory_stores.rs index cfdb8799..f3227c46 100644 --- a/src/crypto/memory_stores.rs +++ b/src/crypto/memory_stores.rs @@ -99,9 +99,9 @@ impl GroupSessionStore { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct DeviceStore { - entries: DashMap>, + entries: Arc>>, } pub struct UserDevices { @@ -121,7 +121,7 @@ impl UserDevices { impl DeviceStore { pub fn new() -> Self { DeviceStore { - entries: DashMap::new(), + entries: Arc::new(DashMap::new()), } }