summaryrefslogtreecommitdiff
path: root/src/library/shape.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-31 16:06:44 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-31 16:47:00 +0100
commit20b1a38414101f842a6d9201133a5aaaa45a7cec (patch)
tree2365453d4dfdebfa11d618baad1a36c65b62d7c7 /src/library/shape.rs
parentfa57d86ed981373b66804972147bf59cab920e6b (diff)
Switch from `Rc` to `Arc`
Diffstat (limited to 'src/library/shape.rs')
-rw-r--r--src/library/shape.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/shape.rs b/src/library/shape.rs
index 12126ab4..5d31d570 100644
--- a/src/library/shape.rs
+++ b/src/library/shape.rs
@@ -66,7 +66,7 @@ impl<S: ShapeKind> Layout for ShapeNode<S> {
ctx: &mut LayoutContext,
regions: &Regions,
styles: StyleChain,
- ) -> Vec<Constrained<Rc<Frame>>> {
+ ) -> Vec<Constrained<Arc<Frame>>> {
let mut frames;
if let Some(child) = &self.child {
let mut padding = styles.get(Self::PADDING);
@@ -118,7 +118,7 @@ impl<S: ShapeKind> Layout for ShapeNode<S> {
frames = vec![Frame::new(size).constrain(Constraints::tight(regions))];
}
- let frame = Rc::make_mut(&mut frames[0].item);
+ let frame = Arc::make_mut(&mut frames[0].item);
// Add fill and/or stroke.
let fill = styles.get(Self::FILL);
@@ -149,7 +149,7 @@ impl<S: ShapeKind> Layout for ShapeNode<S> {
}
/// Categorizes shapes.
-pub trait ShapeKind: Debug + Default + Hash + 'static {
+pub trait ShapeKind: Debug + Default + Hash + Sync + Send + 'static {
const ROUND: bool;
const QUADRATIC: bool;
}