diff --git a/crates/cuddle-clusters/src/components.rs b/crates/cuddle-clusters/src/components.rs index 5cc5c65..1516aea 100644 --- a/crates/cuddle-clusters/src/components.rs +++ b/crates/cuddle-clusters/src/components.rs @@ -1,4 +1,4 @@ -use std::rc::Rc; +use std::sync::Arc; pub trait Component { fn name(&self) -> String; @@ -27,11 +27,11 @@ pub trait Component { #[derive(Clone)] pub struct ConcreteComponent { - inner: Rc, + inner: Arc, } impl std::ops::Deref for ConcreteComponent { - type Target = Rc; + type Target = Arc; fn deref(&self) -> &Self::Target { &self.inner @@ -40,7 +40,7 @@ impl std::ops::Deref for ConcreteComponent { impl ConcreteComponent { pub fn new(t: T) -> Self { - Self { inner: Rc::new(t) } + Self { inner: Arc::new(t) } } }