diff --git a/zstor/src/actors/meta.rs b/zstor/src/actors/meta.rs index be7affb..477a104 100644 --- a/zstor/src/actors/meta.rs +++ b/zstor/src/actors/meta.rs @@ -105,7 +105,7 @@ pub struct ReplaceMetaStore { /// Actor for a metastore pub struct MetaStoreActor { - meta_store: Arc>, + meta_store: Arc, writeable: bool, } @@ -113,7 +113,7 @@ impl MetaStoreActor { /// Create a new [`MetaStoreActor`] from a given [`MetaStore`]. pub fn new(meta_store: Box) -> MetaStoreActor { Self { - meta_store: Arc::new(meta_store), + meta_store: Arc::from(meta_store), writeable: true, } } @@ -257,6 +257,6 @@ impl Handler for MetaStoreActor { type Result = (); fn handle(&mut self, msg: ReplaceMetaStore, _: &mut Self::Context) -> Self::Result { - self.meta_store = Arc::new(msg.new_store); + self.meta_store = Arc::from(msg.new_store as Box); } }